I'm time traveling to make this post

Page 1 of 3 [ 34 posts ]  Go to page 1, 2, 3  Next

TallyMan
Veteran
Veteran

User avatar

Joined: 30 Mar 2008
Gender: Male
Posts: 40,061

08 Mar 2009, 5:23 am

I see the time stamp for posts has gone one hour into the future. Does this mean America has had some sort of time glitch or Americans have simply changed the clocks and in turn wrecked the time for everyone else on the planet?

It seems bizarre seeing my posts having a time stamp one hour in the future. I think the algorithm used for dealing with International time zones on WP has a bug or two.


_________________
I've left WP indefinitely.


SleepyDragon
Veteran
Veteran

User avatar

Joined: 28 May 2007
Age: 70
Gender: Female
Posts: 2,829
Location: One f?tid lair or another.

08 Mar 2009, 7:35 am

I'll be darned, TallyMan, the same thing is happening to me here in Australia. I could have sworn it had not yet gone midnight (hope not! I have to be up early tomorrow!) and yet there's the timestamp: Mon Mar 09, 2009 12:14 am. Crikey! I'd better call it a night. :D



t0
Veteran
Veteran

User avatar

Joined: 23 Mar 2008
Age: 52
Gender: Male
Posts: 726
Location: The 4 Corners of the 4th Dimension

08 Mar 2009, 9:41 am

Daylight savings time did begin in most of America overnight.



TallyMan
Veteran
Veteran

User avatar

Joined: 30 Mar 2008
Gender: Male
Posts: 40,061

08 Mar 2009, 10:55 am

t0 wrote:
Daylight savings time did begin in most of America overnight.


That would explain it. Maybe the rule used by WP for calculating International time zones is simply to add or subtract hours from an American standard time zone, rather than take into account different daylight savings regimes around the world? England / France change over on the 29th of March this year, so the time showing against posts will be incorrect from our perspective for the next three weeks as things stand. I wonder what time saving rules apply to other countries?


_________________
I've left WP indefinitely.


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

08 Mar 2009, 12:07 pm

The bug is called "Microsoft".

Most software in the world takes the sensible approach to holding dates: it maintains them all internally as UTC and displays them as whatever is appropriate in the particular circumstance.

Microsoft decided that there would never be any need to cope with time zones, so set all there clocks to whatever the local time happened to be. Plus they ignored the "problem" of DST, and just assumed everyone would change their clocks twice a year.

So.... generally speaking, if all the sytems involved are non-MS, when you put in a date, the local time is stripped off and a UTC value is stored, and hen that needs to be shown as a time, the local time (which may be anywhere in the world) is incorporated.

However, as soon as the process involves an MS sytem, it will be fairly hit-and-miss whether the local time is respected, and it may be added or subtracted once or twice.

In particular, when DST is involved the extra hour is totally chaotic.

So. I wonder what time I will get when I post this? At this instant, it is 2009/03/08 17:07:00 UTC. (UTC is currently the same as GMT)


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

08 Mar 2009, 12:10 pm

And, the answer is that I have been promoted to British Summer Time, almost a month early.

So... I've just gone and edited my profile to ask for times to be shown as GMT-1, so they will be correct for the next three weeks.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

08 Mar 2009, 12:26 pm

There is, actually, a genunine problem here.

Both the local and the remote transition from standard to DST needs to be known about by the server.

I've just been reading a thread on the phpBB3 forum about a "clever" add-on that handles DST - and the author of that addon has no idea what it is supposed to do - and assumes that the entire world switches DST on/off at the same time. His add-on works if a phpBB board is confined to the USA, say, but is useless in any genuine international setting.

Even worse can be places like Queensland, Australia, where only part of the state uses DST.

So... WP is broken, although it works for people who switch DST at the same time as the states.

The underlying phpBB software should stick to UTC and allow everyone to specify in their profile their time zone (and maybe explicitly the dates on which DST starts/ends, if they even use that).

Finally, WP cannot cope at all with the places that don't use a whole hour time zone. E.g. the whole of India is UTC + 5 1/2 hours.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


Last edited by lau on 08 Mar 2009, 12:41 pm, edited 1 time in total.

TallyMan
Veteran
Veteran

User avatar

Joined: 30 Mar 2008
Gender: Male
Posts: 40,061

08 Mar 2009, 12:32 pm

lau wrote:
The bug is called "Microsoft".
So. I wonder what time I will get when I post this? At this instant, it is 2009/03/08 17:07:00 UTC. (UTC is currently the same as GMT)


Your post shows as 7:26 pm here, i.e. 19:26. However, France is an hour ahead of the UK anyway.

These time warps make the forums confusing. I tend to glance at the time on the forum index to see if anyone has posted in particular forums recently and hence there is something new to read, but with the last post time being in the future it doesn't half throw me. Therefore I may also go and change my time zone to the wrong one for three weeks so it shows the correct time! :?


_________________
I've left WP indefinitely.


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

08 Mar 2009, 1:06 pm

Anyway... the net effect, at present, is that the members that live in the USA don't have to tax their brains about DST.

The members in places that do not use DST at all have to adjust their profiles twice a year, to cancel out the USA DST switches.

The people who switch DST at a time different from the USA have to adjust their profiles four times.

The people living in "non-standard" time zone areas (including Venezuela, some of Canada, Iran, Afghanistan, India, Sri Lanka, Nepal, lots of Australia and a collection of islands all round the world) - well, they just have to give up on the whole process - they can never have the times displayed correctly.

(PS. phpBB3 has the full time zone list, including all the non-standard ones... and has a "tick if you are on DST" thing, so you just need to touch it twice a year, if you have DST)


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


t0
Veteran
Veteran

User avatar

Joined: 23 Mar 2008
Age: 52
Gender: Male
Posts: 726
Location: The 4 Corners of the 4th Dimension

08 Mar 2009, 2:40 pm

lau wrote:
The bug is called "Microsoft".

Most software in the world takes the sensible approach to holding dates: it maintains them all internally as UTC and displays them as whatever is appropriate in the particular circumstance.


Windows does this. The Win32 API provides routines to pull UTC and local time as well as all time zone information based on the parameters you pass in. MS also provides a tool - tzedit - that allows you to add custom time zone information to the registry in case your area changes its time zone rules before MS can issue a patch. It really looks like the BBS isn't calling the correct routines or performing the math correctly. In order for it to be completely accurate, it would need a more comprehensive list of time zones than it currently has. My copy of XP, for example, has 91 time zone options.



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

08 Mar 2009, 4:15 pm

t0 wrote:
lau wrote:
The bug is called "Microsoft".

Most software in the world takes the sensible approach to holding dates: it maintains them all internally as UTC and displays them as whatever is appropriate in the particular circumstance.


Windows does this. The Win32 API provides routines to pull UTC and local time as well as all time zone information based on the parameters you pass in. MS also provides a tool - tzedit - that allows you to add custom time zone information to the registry in case your area changes its time zone rules before MS can issue a patch. It really looks like the BBS isn't calling the correct routines or performing the math correctly. In order for it to be completely accurate, it would need a more comprehensive list of time zones than it currently has. My copy of XP, for example, has 91 time zone options.

I'm afraid you are missing the point.

The things you are talking about are layered on top of an OS that is only happy when the hardware clock is set to local time. Hence, around daylight saving time switchover, you have both the client and server end of a connection, each messing around with local clocks, time zones, differing DST tables, and general chaos.

There is no coherent way, so far as I am aware, for a server to ask an HTML client to tell it what the time zone at the client end is, and more to the point, when the DST switch (if any) will occur.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 36
Gender: Male
Posts: 12,518
Location: Room 101

08 Mar 2009, 4:16 pm

lau wrote:
The bug is called "Microsoft".

That tends to be true of most computer problems.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


TallyMan
Veteran
Veteran

User avatar

Joined: 30 Mar 2008
Gender: Male
Posts: 40,061

08 Mar 2009, 5:02 pm

I would not expect to see bugs of this nature still occurring in 2009. I thought all programmers got clued up about handling dates and times before the millennium bug none-event. Surely time zones and changes for daylight saving should be standard API's on everything nowadays? This sort of foul up should still not be happening. It isn't like time zones and daylight saving time are new recently introduced concepts.


_________________
I've left WP indefinitely.


Quatermass
Veteran
Veteran

User avatar

Joined: 27 Apr 2006
Age: 43
Gender: Male
Posts: 18,779
Location: Right behind you...

08 Mar 2009, 6:07 pm

The loa are displeased.


_________________
(No longer a mod)

On sabbatical...


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 77
Gender: Male
Posts: 9,798
Location: Somerset UK

08 Mar 2009, 7:17 pm

TallyMan wrote:
I would not expect to see bugs of this nature still occurring in 2009. I thought all programmers got clued up about handling dates and times before the millennium bug none-event. Surely time zones and changes for daylight saving should be standard API's on everything nowadays? This sort of foul up should still not be happening. It isn't like time zones and daylight saving time are new recently introduced concepts.

It's the Mystères.

No... but in fact, time zones change, and DST rules get altered. It is not static data. It needs to be updated, from time to time (pun!).

It's even worse than you might think, because, to be pedantic, if you wanted to show someone the date stamp of a file, if you think about it, that time should be shown as the local time they would have seen, had they been around at the time the file was actually created. Hence one should really keep a full record of all the history of time zones and DST's, going all the way back. You should even have them for changes in the future, so that appointments can be kept properly in order.

Of course, you don't do all that. You really don't care an awful lot about the odd hour, except when it is close to the current moment.

I.e. the underlying UTC date/time (which MS doesn't understand, but Unix, Linux, Apple and everyone else maintains correctly) is the basis and any local twiddles get applied to that.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


t0
Veteran
Veteran

User avatar

Joined: 23 Mar 2008
Age: 52
Gender: Male
Posts: 726
Location: The 4 Corners of the 4th Dimension

08 Mar 2009, 10:43 pm

lau wrote:
I.e. the underlying UTC date/time (which MS doesn't understand, but Unix, Linux, Apple and everyone else maintains correctly) is the basis and any local twiddles get applied to that.


I'd really like to see your source for this and how it truely affects the timestamp on posts on this BBS. Win32 provides the GetSystemTime() function that provides the current time in UTC. The users on this forum provide their timezone to the server in their profile. Therefore, the BBS should be able to:
1) Provide a comprehensive list of timezones for users to choose from (it does not).
2) Retrieve the current time in UTC from the OS (Microsoft supports via Win32) when a post is submitted.
3) Store it in a database (probably MySQL - not a Microsoft product).
4) Retrieve the time in UTC from the database.
5) Perform basic math to convert the time from UTC to the local time of the user reading the post.

I agree with you that #5 is somewhat complicated in that you would need to keep a list of all time adjustment rules for all eternity to be able to properly display a time in the past. But the BBS doesn't even handle the current set of rules correctly.

My point is that you're exhibiting a "bash Microsoft first" mentality with no evidence to back it up. In this case it is one of the many non-MS layers that is the limiting factor and not the OS. The BBS (not Microsoft) is using PHP (not Microsoft) which provides its own functions for accessing the current time and timezone settings on the server. If these non-Microsoft products can't handle #1,3,4,5 above, it's not Microsoft's fault.