MyBB Community Forums

Full Version: Time Zone in error log or "date sent" in user email log.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2016-07-26, 04:28 PM)Matt. Wrote: [ -> ]To explain why it works how it does:

The code would only determine the format to display it in, using the php date() function to convert the timestamp to a readable date in the server's timezone (default PHP functionality). The way we output dates on the front end is with a custom function which basically amends the timestamp with an offset and bases the timestamp off GMT (so -5 hours or -18000 seconds for New York). However, the ACP just uses the default PHP functionality so is based on the server. To change it would mean finding eeeeevery occurrence of the date() function and change it to the custom function and make sure it had the correct offset available to it.

But yes, if you're on shared hosting it won't be possible Sad

Thank for explaining.

Marking this as solved, as nothing can really be done about it right now. And even if the code were to be changed in the future, I don't know how much of a priority it is, compared to other functionality or features.
What's the value of date.timezone in your php.ini file? I'm also in mountain time, so I set it to "America/Denver".
Forgot one thing that might work, you could try putting this at the top of ./admin/index.php:

date_default_timezone_set('America/Los_Angeles');

Then change the actual timezone value to one from here: http://php.net/manual/en/timezones.america.php

No idea if it'll work though as don't think it will on every system setup.
(2016-07-26, 08:27 PM)Matt Wrote: [ -> ]Forgot one thing that might work, you could try putting this at the top of ./admin/index.php:

date_default_timezone_set('America/Los_Angeles');

Then change the actual timezone value to one from here: http://php.net/manual/en/timezones.america.php

No idea if it'll work though as don't think it will on every system setup.

Just getting to trying the help suggestions I've received the last few months.

Adding that in admin/index.php worked!  Thanks.
Pages: 1 2