ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
Re: [Tutor] can time.time() be reversed so as to get date?
by Alan Gauld other posts by this author
Nov 6 2009 4:57PM messages near this date
Re: [Tutor] can time.time() be reversed so as to get date? | Re: [Tutor] can time.time() be reversed so as to get date?
"Dave Angel" <davea@[...].org>  wrote

>  GMT, and you want GMT for the final date & time.  If you do convert to 
>  local time and back, you risk getting two kinds of errors:
>     1) the time zone known to the system may differ from the one you 
>  have using the magic number 330, especially when the system changes to 
>  daylight savings time, and you forget to adjust your value.
>     2) There is an hour of time in the fall or spring (I think it's in 
>  the fall) when a UTC time cannot be unambiguously represented as local 
>  time.  

There are a myriad of problems involved in working with time zones.
I once had an undergraduate student on summer vacation do a study 
on it for me and he produced a paper of over 100 pages documenting 
something like 30 different issues he had uncovered. Most of those 
issues are still valid today some 15 years later.

If you are working in one timezone its not too bad (although that 
depends on which one!) but even then there are issues like the 
daylight savings switchover - when 1:30am can come after 1:45am!

And if you include local geographical and political factors it 
gets impossible. There is somewhere in the Pacific where the same 
street has two different timezones and the local government there
have chosen a different date to implement DST from everywhere 
else in either of the timezones! I once went on hioliday to a small 
European country where they delayed DST by a week because 
it would have spoiled the skiing! This was announced on public radio 
on the Wednesday before the clocks were due to change! How is a 
computer system supposeed to deal with that kind of arbitrary behaviour?!

And finally we represent times using a discrete numbering system 
but it is an essentially analog quantity with an arbitrary baseline, so 
there are always opportunities for error and inexactitude, especially 
with small values.

rant over,

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@[...].org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Thread:
Shashwat Anand
Vince Spicer
Alan Gauld
Alan Gauld
Alan Gauld
Timo
Shashwat Anand
Luke Paireepinart
Shashwat Anand
Dave Angel

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved