Figuring out Gregorian date from hours since 0001-01-01

Tyler Eaves tyler at tylereaves.com
Fri Sep 1 23:18:32 CEST 2000


On 1 Sep 2000 21:09:56 GMT, Alexander Lawhead <alawhead at vcn.bc.ca>
wrote:

Although I'm not familiar with the module involved, I would have to
say that the affect is probably caused by the fact that a day isn't
exactly 24 hours long.

>I'm extracting data from a set of packaged data files and am having a
>problem converting the dates into a useable format. Each observation's
>date is given as the number of hours since 0001-01-01. I picked up the
>mxDateTime pacakge, thinking that it would be easy to convert this into an
>equivalent Gregorian date. After a quick run through of the docs I'm
>stumped. Going from number of days or number of seconds from 0001-01-01 is
>easy... hours doesn't seem right. If I naively convert hours to days by
>dividing by 24 I'm off by a few days.
>
>Any ideas?
>
>Thanks,
>
>Alexander
>

---
Tyler Eaves

Visit Ultra Coaster Central!
The internet's largest repository
of Ultra Coaster Tracks!

http://www.tylereaves.com/uc/


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



More information about the Python-list mailing list