Time Zone Debug

Time Zone Debug 1.0.0

No permission to download

Sim

Well-known member
Sim submitted a new resource:

Time Zone Debug - Check your timezone settings for debugging time display issues on the forum.

Provides a simple admin UI for debugging timezone issues on your server.

After installation, look for the "Time Zone Debug" option in the Tools menu of the admin UI.

View attachment 214854

If UTC time is incorrect - you most likely have a server configuration issue and not a XenForo issue.

Note that logs are generally shown in the time zone you have chosen in your personal preferences.

Cron task next run times are also shown in your time zone - however, when editing cron...

Read more about this resource...
 
however, when editing cron tasks be aware that execution times are in UTC.

Why is that the case? Because of server defaults? Are all servers configured like that?

Thanks for the addon btw.
 
Why is that the case? Because of server defaults? Are all servers configured like that?

There really is no good reason. It has been brought up here in the forums numerous times and never with a good reason form XenForo why it still remains this way. I would guess that if XenForo wasn't based in UTC/GMT this wouldn't have ever been coded this way. The correct way for daily crons to run is using the local server time this is correct for any piece of software. Running crons based off of UTC/GMT makes absolutely no sense and is only a non-issue for admins who live in that single timezone, for the rest of us it is an issue and inconvenience.

It could be easily changed by XenForo. The change would hurt no one but would help all. I gave up thinking this would ever be corrected after reporting it multiple times and seeing the similar reports dating back to the original release of XenForo. If anything make an option to be able to adjust it, it would be pretty simple for them to code.

Maybe I'm crazy but it just makes no sense to me.

...thanks for letting me vent one more time on this :)
 
  • Like
Reactions: sbj
Thanks for the explanation. Well, it annoys me aswell so that I had to install this addon to check if my configuration is correct.
I was doubting myself thinking that my server time might be wrong. But it seems all is good, just the cron timer is based on UTC+0 like it was explained. I can't think of a reason besides it being convenient for UK, why this was made like this from the start. Well, we have to adapt, nothing we can do about it.
 
The correct way for daily crons to run is using the local server time this is correct for any piece of software

Actually no.

My servers are in Singapore and in Newark NJ - while I am in Sydney. I don't want to be constantly translating timezones in my head and trying to remember which timezone I'm dealing with right now - hence I run all of my servers in UTC.

I can understand if my server and every single admin who might touch my server were in the same timezone then I might get away with using local time on my server - but here in Australia we have 3 timezones (5 if you include DST differences), so if I have someone in another city helping me to run my server, then we already have a conflict.

That's kind of the point - using local time is only a good solution for some people in specific circumstances while it is actually really bad in others.

The decision to use universal time actually makes perfect sense for the general case - since you then know it will be consistent ... hence the name Universal Time.

As I said ...

There are arguments for and against doing things in local time versus universal time.
 
Ah, well, in that case it makes sense of course.

But wouldn't you say the general case for people is that their servers will be in the country they live in? Or at least very close (a neighboring country), which would be likely in the same timezone?

I would say the exception case is your situation @Sim , not the general case like you say.
 
I would guess that if XenForo wasn't based in UTC/GMT this wouldn't have ever been coded this way.

I can't think of a reason besides it being convenient for UK, why this was made like this from the start.

UTC is universal time and is different to GMT - even though both terms are often used interchangeably.

GMT is a timezone, while UTC is not. UTC is a standard which is used worldwide and does not change with seasons like GMT does.

The whole point is to have a time which is universally consistent and usable anywhere in the world to represent a specific point in time.

The fact that the XenForo devs chose to use it would not have been reflective of the point that they are based in the UK - but rather, because they are software developers developing software to be used worldwide.

When I write software - I always store and manipulate times using UTC - I only ever convert to local time for display purposes.

That's not to say they couldn't improve the UI for setting cron tasks - but you do need to understand that there is a completely valid reason for them to have chosen UTC for cron from a software dev perspective.
 
But wouldn't you say the general case for people is that their servers will be in the country they live in? Or at least very close (a neighboring country), which would be likely in the same timezone?

No - I wouldn't say that.

That might be the perspective of someone who lives in the US - especially given the extremely US-centric nature of the internet historically - but from people in the rest of the world, you'll find that dealing with multiple timezones is a matter of course.

Even someone in Australia is likely to have their servers hosted in Sydney or Melbourne, but they may be located in Brisbane which has a separate timezone because they don't do daylight savings time.

Timezones are very much non-trivial.
 
I am not saying or questioning why they chose UTC from a developent standpoint. It makes 100% sense.
But would it be so hard to display the time in the cron settings also in the localtime next to the UTC?
Is there a reason why only the UTC time is displayed (without even mentioning which timezone is being displayed)? I can't think of a reason why not including the local time of the user as we all are accustomed to deal things like this in daily life. 99% of admins won't be developers thinking in UTC time all the time.
That's what what was being said. Not advocating here to abandon UTC, but the general admin looking at the ACP will want to setup the cron in his own time settings.

Also I'm European, not American. I can deal with timezones, but here in Europe all countries are small. We don't have multiple timezones in a single country (excluding Russia). Again, for Australians or Americans it makes sense, but not for Europeans. There are 3 timezones across 50 countries. So many fall under the same timezone.
UTC+0, UTC+1 and UTC+2 is whole Europe basically.
 
That's not to say they couldn't improve the UI for setting cron tasks - but you do need to understand that there is a completely valid reason for them to have chosen UTC for cron from a software dev perspective.

I can see why they choose to use UTC. But like you said, it seems there is room for improvement as far as crons go. I think the simplest solution to those who find it inaccurate and inconvenient would be to just add an admin option that allows cron run times to be based off different time options like:

1) UTC
2) Server Time
3) User adjustable timezone-offset (with selectable DST option)

I would think a solution like this would be pretty easy to put together for XenForo coders or someone familiar with the XenForo cron coding already.
 
Top Bottom