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
The time display is fine on the main forum.

But in the error log, or in the "date sent" in the user email log, it's 2 hours ahead.  I think that's the server time.

Can I change that to my local time zone?

Thank you.
In admin CP, try to change time zone to your zone

ACP > Configuration > Settings > Date and Time Formats
Thanks.

The default time zone is already in my time zone.
(07-24-2016, 06:00 PM)nuraman00 Wrote: [ -> ]Thanks.

The default time zone is already in my time zone.

You can try enabling day light saving in that page only in admin CP
Thanks. I don't think it's doing anything either. Also, I'm 2 hours off.
I think you'd need to change the actual time on the server; do you have SSH access to your server or is it a shared server? I see TMD offer both.
(07-24-2016, 06:43 PM)Matt. Wrote: [ -> ]I think you'd need to change the actual time on the server; do you have SSH access to your server or is it a shared server? I see TMD offer both.

I have SSH access. They also provided a console access to the DB through php MyAdmin.

If I query the datetime in one of the latest emails, it's "1469380568 ". The table was "mybb_maillogs".

If I use epoch converter:

http://www.epochconverter.com/

It tells me: Your time zone: Sunday, July 24, 2016 10:16:08 AM GMT-7:00 DST

That's the time I want to see. Instead, I see "07-24-2016, 12:16 PM" in the MyBB Admin console.
Yeah, a timestamp doesn't have any timezone though so will return a different time based on which timezone the server using it has.

This looks like what you'll need to do to change it: http://www.thegeekstuff.com/2010/09/chan...-in-linux/
(07-24-2016, 06:48 PM)Matt. Wrote: [ -> ]Yeah, a timestamp doesn't have any timezone though so will return a different time based on which timezone the server using it has.

This looks like what you'll need to do to change it: http://www.thegeekstuff.com/2010/09/chan...-in-linux/

So I have to request SSH access. I submitted a request to do so.

When I FTP into my etc dir, I don't see a localtime nor a timezone file. I only see ftpquota and cacheid.

I'm also not sure what distribution I have, so I thought I would ssh in and find out what distribution I have.

Then I would try the tip from the guide above.

It doesn't look like I have one of the linux distributions mentioned in that blog.

I'm going to ask my host how to change the time zone on the server.

It's too variable, depending on what distribution I could have.

I think I have CloudLinux.

(07-24-2016, 06:43 PM)Matt. Wrote: [ -> ]I think you'd need to change the actual time on the server; do you have SSH access to your server or is it a shared server? I see TMD offer both.


I'm still not 100% clear on why I need to change the time zone on the server? If the timestamp is stored as an epoch number, doesn't the MyBB Admin console determine what time zone to display it in?

They said I can't change the time zone of the server because it would affect all users. Since I'm on shared hosting.
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
Pages: 1 2