Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ Forum ➜ Suggestions ➜ To help those of use with daylight savings time...

To help those of use with daylight savings time...

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Thu 17 Jan 2008 10:44 PM (UTC)
Message
I just noticed that all of the times listed for the posting are an hour off, since I forgot to reset my time a few months ago. Is there chance of us getting the option to obey the insanity called "Daylight Savings Time" at all? It is a system I think we should have abolished, but since it is mandated by my government, could there be a way to set the time to the U.S Eastern Time Zone instead of just -5 or -4 UTC changing manually every few months?

It is much easier to fight for one's ideals than to live up to them.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 18 Jan 2008 02:27 AM (UTC)
Message
Well I think that DST changes from year to year, and from place to place.

For example, here in Australia they legislated during the 2004 Olympics to put it back (or is it forwards?) a week so that the Olympic Games had more daylight, but only for that year.

Also some states in Australia (Queensland I think) don't use Daylight Saving, whereas others, on the same longitude, do.

So, to automatically adjust would be quite complex.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Isthiriel   (113 posts)  Bio
Date Reply #2 on Fri 18 Jan 2008 03:07 AM (UTC)
Message
Quote:
So, to automatically adjust would be quite complex.

Yes, which is why you use other people's code to do it for you.

At least, in Python there is a user-contributed library called pytz which takes a 'timezone' of the form "Australia/Adelaide" or "US/Eastern" and produces an object that can be passed back to the main date/time routines to convert to and from UTC or unix epoch. It uses the information in Olson timezone database with a matching version number.

(A little searching shows php5.1+ is supposed to have the same ability in the standard library?)
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Fri 18 Jan 2008 05:01 AM (UTC)
Message
Linux distributions come with code to do this too; I believe it's part of the standard gcc libraries.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #4 on Fri 18 Jan 2008 09:11 PM (UTC)

Amended on Fri 18 Jan 2008 09:12 PM (UTC) by Shaun Biggs

Message
I have no idea if it is part of gcc libraries or not, but I know on my Linux box, I can set the timezone to any of a number of different settings, similar to what Isthiriel mentioned with pytz. They even automagically updated everything last year when they went and moved the dates around a month or so. Now the gap for the U.S. is Nov/March instead of Oct/April. In theory, this will save us on energy costs in some odd fashion... right...

UTC or bust!

It is much easier to fight for one's ideals than to live up to them.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


19,400 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.