Support Forum

Make timezone relative to UTC, not server?

CH Chriswaterguy
Chriswaterguy
Member

In profile options, it has:

“Set your Timezone as +/- hours from Server”

 

People are more likely to know where they are relative to UTC. If I see “Chicago” I have to start guessing or looking up, and if it's “unknown” as sometimes happens, then I'm stumped.

 

Also, I like the MediaWiki preferences option to “fill in from browser”. Click, and (for anyone with a correct clock on their machine) it's done.

 

Even better would be if all of this info was shared with the main WP profile, but I'm brand new here, so I'll look around first…

 

Thanks

14 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

There is no timezone setting in the WP profile.
What we can do after WP moves to php 5 is offer the user the same dropdown list as the blog settings which should make it easier. I am not convinced that everybody out there is familiar with UTC

CH Chriswaterguy
Chriswaterguy
Member

Ok, thanks.

 

Yellow Swordfish said:

I am not convinced that everybody out there is familiar with UTC


Surely more than are familiar with the particular timezone of the server, even if they know where the server is? And more still if we say “GMT”.

And I don't know how I'd work out the difference without reference to UTC/GMT, anyway. And my guess is that those that don't know their UTC offset are unlikely to be editing a setting like this anyway.

Of course, I'm assuming a global community. If it's a bunch of people living in the same zone as the server, that's different, but I suspect that's rare.

 

ÁM Álvaro Degives-Más
Álvaro Degives-Más
Member

In a perfect world, relative to UTC makes sense. In the world of WordPress withing the universe of hosting galaxies, setting time offset relative to the server makes much more sense; I've had several issues with server offset on different hosting companies until WP started using the server offset (sometime later in the WP2.x series) and from then on the facility to indicate a the offset in SP worked perfectly reliable – including the regular daylight saving nonsense jumps. (No I'm no fan of daylight saving but that's neither here or there.)

MP Mr Papa
Mr Papa
Member

not sure I understand the discussion turns here…  we offer the option for users to update their time as an offset from the server time (which is displayed by timezone)…  in v5.0, we will change the offset to be a timezone selection for the user. we will then calculate the offset to get the correct time…  It should behave properly with DST too… 

and yes, like living in Arizona where we do not change for DST…

CH Chriswaterguy
Chriswaterguy
Member

Thanks for the replies – I look forward to version 5.0 with the dropdown timezone list :-).

YS Yellow Swordfish
Yellow Swordfish
Member

And me actually! Looking forward to V5 that is…

PA PaddleMan
PaddleMan
Member

Well – Now that I read the above thread – I see why things are the way they are.

However, every single visitor to my site (pretty much) will  to be in UTC +13 – as it is a local community site.

My server sites in USA – so the server time is irrelevant.

My WP timezone is set correctly so that it is also set to UTC +13.

So in WP Settings it shows up as this:

  • UTC time is 
    2012-11-19 19:57:01

     Local time is 

    2012-11-20 8:57:01

Yet when the user goes to the profile screen and presses options, he sees this:

Server Timezone set to: UTC

This timezone is currently in standard time

Server Time is: 2012-11-19 19:55:57

Local Time is: 2012-11-19 19:55:57

UTC Time is: 2012-11-19 19:55:57

 

But I want all users to have their time zone prepopulated to UTC+13 when their profile are created. Is this doable? Infact I like to preset a few profile options at registration time – including time zone, Disable the visual editor when writing and a couple of other stuff like their default editor.

MP Mr Papa
Mr Papa
Member

you really should not use UTC+13… its really not a valid timezone… still dont know why wp put in their options… things work so much better if you select and actual timezone in the wp settings…  there will be a city in that +13 zone…

then you will see users who dont select their own timzeone will get that as the default…

disable the visual editor??  just dont use the tinymce plugin… must be missing something here…

YS Yellow Swordfish
Yellow Swordfish
Member

WP kept the UTC options in the drop down select list to be backward compatible with all pre-php 5 WP sites when only UTC was available and was basically hand coded.

A mistake in my opinion but I sort of understand why they did it.

PA PaddleMan
PaddleMan
Member

Mr Papa said
then you will see users who dont select their own timzeone will get that as the default…

Sorry – but did not work…. I changed it from UTC+13 to Auckland. Saved the WP settings…. Registered a new user. Went to the new user’s prfile and the time zone is set to UTC!!  This is going to annoy the visitors! I might hide away the option to change the time zone – that way every user will have the wrong local time – but at least they will all be consistently wrong and right relative to each other.

MP Mr Papa
Mr Papa
Member

I dont understand that…  just tested it and worked for me…

and the create new member data is straight forward

    $useropts[‘timezone’] = get_option(‘gmt_offset’);
    if (empty($useropts[‘timezone’])) $useropts[‘timezone’] = 0;
    $tz = get_option(‘timezone_string’);
    if (empty($tz) || substr($tz, 0, 3) == ‘UTC’) $tz = ‘UTC’;
    $useropts[‘timezone_string’] = $tz;

as long as you have a valid timezone string, ie Auckland, it will init new users with that…

so puzzled… 

YS Yellow Swordfish
Yellow Swordfish
Member

We are talking about the timezone set on the forum – look at that new users SP profile – not their Wp profile. What does THAT say?

PA PaddleMan
PaddleMan
Member

Sorry – I guess I looked at the Last Visit date – not the Registered date!!! And you are both correct and I am sorry for reporting as not working.

It is a bit weird to see the registration date later than the last visit date!!

 

But when the user logs in with the password that was emailed during the registration, the last visited date also gets corrected.

I am a happy now. Thanks for helping me with this.