Distributed system across time zones: Recording timestamps e

Discussions about design and architecture principles, including native JADE systems and JADE interoperating with other technologies
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Distributed system across time zones: Recording timestamps e

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:15 am

by Eric Peachey >> Fri, 22 Oct 1999 2:44:18 GMT

Hello,

Just wondering what thoughts you people have on the handling of dates and times in systems that have users in different time zones. Say you want to record when something happened, do you record the time on the user's machine, the time on the server machine, or the time relative to GMT?

I have vague memories of systems I've worked on in the past that made automatic adjustments according to the user's time zone settings and have recorded UTC/GMT times in the database. Forte systems used to do this kind of thing - this got quite confusing at times - particulary when combined with some bugs in early releases. Some C libraries also used to make automatic adjustments (based on time zone, day light saving and GMT) as well if I remember correctly. Does JADE have these kind of features?

Eric in Dunedin where the harbour and peninsular are a real picture today!

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Distributed system across time zones: Recording timestamps e

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:15 am

by John Porter >> Thu, 25 Nov 1999 4:44:20 GMT

Eric,

The LINC UNIX team recently experienced this - developers in New Zealand and Australia, with most of the machines in Australia. Standard UNIX functions record everything in GMT, and use the user's TIMEZONE environment variable to convert for presentation to the user. This is fine for timestamps recorded in the database, but when writing a log file, for instance, a more user-friendly display is required. UNIX LINC wrote the log files using the user's time (without identifying the timezone), and this was a problem. There would be entries showing 9:02 then 11:02 and then 9:02 again. If the timezone had been appended it would have been ok.

Where possible, times should be stored in gmt and converted when displayed.

User-oriented displays should be in the user's time zone; machine-oriented displays should be in server time (eg central logging). If it is possible that time displays may be relative to different zones, the time zone used should be shown. Netscape news handler shows your post was made "Fri, 22 Oct 1999 15:44:18 +1300", ie 15:44 your time, which is 13 hours ahead of GMT. ELM stores each user's time zone as an offset to gmt.

Cheers,
John P


Return to “Design and Architecture”

Who is online

Users browsing this forum: No registered users and 17 guests

cron