[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.
SYNOPSIS
#include <sys/types.h>
#include <time.h>
time_t time(time_t *tloc);
DESCRIPTION
The time() function returns the value of time in seconds
since 00:00:00 UTC, January 1, 1970.
--- Michael Doornbos <mike@imapenguin.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I am writing a python program to log variable observations. I have a
> function
> in the program that computes the current Julian date (or any Julian
> date
> 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
> very
> close, but was always 13 seconds off. Then I checked for the current
> leap
> second status and it happens to be 13. So now the program reports
> the
> correct Julian Date, but my question is:
>
> Do we take the leap seconds into account or not? Apparently my Linux
> box
> running ntp, with Python2.2's time module has no idea that they
> exist. Can
> someone enlighten me?
>
> Thanks,
>
> Mike
>
>
> - --
> Michael Doornbos
> President
> Imapenguin, LLC
> mike@imapenguin.com
> www.imapenguin.com
> 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
>
> iD8DBQE8/RB4bm5I3f4F+XwRAsyiAKC7f8GPfksa508s2E5Tcp/bXBrqnACgt9p2
> 1UjcpPIwcTtAWVQa3d81h54=
> =T4wC
> -----END PGP SIGNATURE-----
>
>
=====
Chris Albertson
Home: 310-376-1029 chrisalbertson90278@yahoo.com
Cell: 310-990-7550
Office: 310-336-5189 Christopher.J.Albertson@aero.org
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com