[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: leap seconds
I've noticed that the C library does a very good job. If you work
(internally) in units of time_t and only convert to other formats
for display all will work out fine.
I don't know about Python's internals. I'm surprized it is not
based in the c libraries.
I have Julian date functions in C in you need them.
time_t time(time_t *tloc);
The time() function returns the value of time in seconds
since 00:00:00 UTC, January 1, 1970.
--- Michael Doornbos <firstname.lastname@example.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> I am writing a python program to log variable observations. I have a
> in the program that computes the current Julian date (or any Julian
> given date/GMT). I tested it against XEphem and I was a little off.
> I got
> better day/year values for earth (23.9344 and 365.2422) and it got
> close, but was always 13 seconds off. Then I checked for the current
> second status and it happens to be 13. So now the program reports
> correct Julian Date, but my question is:
> Do we take the leap seconds into account or not? Apparently my Linux
> running ntp, with Python2.2's time module has no idea that they
> exist. Can
> someone enlighten me?
> - --
> Michael Doornbos
> Imapenguin, LLC
> PGP Fingerprint
> 2F98 37A3 F49F 422F 7D0F C9F0 6E6E 48DD FE05 F97C
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> -----END PGP SIGNATURE-----
Home: 310-376-1029 email@example.com
Office: 310-336-5189 Christopher.J.Albertson@aero.org
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup