[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  Forum
. -> [Folder]  Suggestions
. . -> [Subject]  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] Refresh page


Posted by Shaun Biggs   USA  (644 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (22,966 posts)  [Biography] 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
[Go to top] top

Posted by Isthiriel   (113 posts)  [Biography] 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?)
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] 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
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] 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.
[Go to top] 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.


17,262 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]