Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong PHP Server Time #16401

Closed
thegeettanna opened this issue Feb 23, 2021 · 6 comments
Closed

Wrong PHP Server Time #16401

thegeettanna opened this issue Feb 23, 2021 · 6 comments
Labels
Bug or PR need more information This bug or PR needs more information (answer to a question or more accurate description) Bug This is a bug (something does not work as expected)

Comments

@thegeettanna
Copy link

thegeettanna commented Feb 23, 2021

I know seems to be less of a Dolibarr issue, it is rather a Xampp issue that i haven't been able to figure out yet.
In 'About Dolibarr' section, I saw the date on the "=> PHP Time (server)" & " => Client time (user)" is wrong. Although the TimeZone is correct.
Was not able to find answers online. Since I am using Dolibarr on Xampp, this is the community I reach out to.
Screen shots attached.

I came across the below and tried these three steps amongst others, but still getting wrong date & time.
"Europe/Moscow" was replaced by "Asia/Kolkata" in all the instances.
|||||||||||||||||

Try this

  1. In httpd.conf (\xampp\apache\conf\httpd.conf) , add the following line:
    SetEnv TZ Europe/Moscow
  2. Edit php.ini (\xampp\php\php.ini) date.timezone value in [Date] section:
    date.timezone = "Europe/Moscow"
  3. In my.ini (\xampp\mysql\bin\my.ini) add or replace
    default-time-zone = "Europe/Moscow"
    Restart Apache and MySQL
    ||||||||||||||||

Steps to reproduce the behavior

Attached files (Screenshots, screencasts, dolibarr.log, debugging informations…)

108851676-b5fded00-760a-11eb-928f-15a37b9292c5
108851705-bd24fb00-760a-11eb-83bc-329a2409711e

@thegeettanna thegeettanna added the Bug This is a bug (something does not work as expected) label Feb 23, 2021
@ksar-ksar
Copy link
Contributor

Hello,

What version of Dolibarr ? There were some fix regarding this in V13.0.1

@ksar-ksar ksar-ksar added the Bug or PR need more information This bug or PR needs more information (answer to a question or more accurate description) label Feb 23, 2021
@toni-mx
Copy link

toni-mx commented Feb 23, 2021

@ksar-ksar still present in V13.0.1

Environment
Version: 13.0.1
OS: Linux
Web server: Apache
PHP: 5.6.40
Database: MySQL or MariaDB 5.6.49-cll-lve

Time of posting: 11:17 am UTC -6 (PHP server time is correct)

Captura de pantalla 2021-02-23 111803

@thegeettanna
Copy link
Author

Hello,

What version of Dolibarr ? There were some fix regarding this in V13.0.1

I am currently on V13.0.0
Will upgrade during weekend. Will be able to ascertain if this was fixed or not then.

@ksar-ksar
Copy link
Contributor

@ksar-ksar still present in V13.0.1

Environment
Version: 13.0.1
OS: Linux
Web server: Apache
PHP: 5.6.40
Database: MySQL or MariaDB 5.6.49-cll-lve

Time of posting: 11:17 am UTC -6 (PHP server time is correct)

Captura de pantalla 2021-02-23 111803

Hello,

Your PHP server configuration seems wrong.
"Hora de Verano :" is No for server and Yes for client....

@toni-mx
Copy link

toni-mx commented Mar 3, 2021

@ksar-ksar still present in V13.0.1
Environment
Version: 13.0.1
OS: Linux
Web server: Apache
PHP: 5.6.40
Database: MySQL or MariaDB 5.6.49-cll-lve
Time of posting: 11:17 am UTC -6 (PHP server time is correct)
Captura de pantalla 2021-02-23 111803

Hello,

Your PHP server configuration seems wrong.
"Hora de Verano :" is No for server and Yes for client....

Hi @ksar-ksar

Thank you for your reply, I know it seems wrong configuration. The thing is PHP server Time is correct. and the client doesn't even windows seems to be fine.

Any hint as of what can be wrong?

@thegeettanna
Copy link
Author

@ksar-ksar,
It is resolved in Version 13.0.1.
Thank you.

Closing this case.

@Toni-RS,
Try this & it might resolve your issue. Good luck.

In httpd.conf (\xampp\apache\conf\httpd.conf) , add the following line:
SetEnv TZ Europe/Moscow
Edit php.ini (\xampp\php\php.ini) date.timezone value in [Date] section:
date.timezone = "Europe/Moscow"
In my.ini (\xampp\mysql\bin\my.ini) add or replace
default-time-zone = "Europe/Moscow"
Restart Apache and MySQL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug or PR need more information This bug or PR needs more information (answer to a question or more accurate description) Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

3 participants