Znote / ZnoteAAC

Developement repository for the Znote AAC project. A website portal to represent and manage your Open Tibia server.
MIT License
146 stars 127 forks source link

TimeZone of getClock() #276

Closed Riverlance closed 7 years ago

Riverlance commented 7 years ago

This makes any sense?

https://github.com/Znote/ZnoteAAC/blob/master/config.php#L54

if ($adjust) $adjust = (1 * 3600); // Adjust to fit your timezone. of function getClock(). Because it always adds 1 hour, no matter what if $adjust is true. I think it would fit the user timezone, as it says.

Thanks, @Znote ! (:

Znote commented 7 years ago

Change the 1 3600 to whatever fit the timezone you want, and it will work. (etc 2 3600 to adjust +2 hours).

Riverlance commented 7 years ago

I thought it would get the time zone value automatically from the user computer. xd So, don't you think it should has a value like $config['timezone'] = -7;?

Znote commented 7 years ago

It uses the date function, so if you configure the date and timezone properly on the host machine, it should return correct timestamps. Then just set adjust to 0. (instead of X * 3600) The function is just a lazy approach to simulate correct timezone if it is already wrong.