Re: Getting GMT time
- From: Kevin Kenny <kennykb@xxxxxxx>
- Date: Sat, 31 Dec 2005 10:51:38 -0500
Stefaan wrote:
I use following algoritm to determine the GMT time to calculate planet positions[snip]
## Following command will convert the local time t to GMT time
clock scan [clock format $t -format "%Y-%m-%d %H:%M:%S" -gmt 1] 1136022869
That is just plain wrong.
Whatever you might believe, [clock seconds] returns the number of nominal seconds since 00:00 UTC, 1 January 1970. There is no such thing as "local seconds" in Tcl. All time zone conversion happens inside [clock scan] and [clock format]. If [clock seconds] reports time in the local time zone and not UTC, that is a bug. (Nobody has reported such a bug - and since I'm the mainainer of [clock], I'd surely know if anyone had.)
-- 73 de ke9tv/2, Kevin .
- Follow-Ups:
- Re: Getting GMT time
- From: Stefaan
- Re: Getting GMT time
- References:
- Getting GMT time
- From: Anonymous AtWork
- Re: Getting GMT time
- From: Bryan Oakley
- Re: Getting GMT time
- From: Anonymous AtWork
- Re: Getting GMT time
- From: Stefaan
- Getting GMT time
- Prev by Date: Re: Who gets a newsgroup?
- Next by Date: Re: Getting GMT time
- Previous by thread: Re: Getting GMT time
- Next by thread: Re: Getting GMT time
- Index(es):
Relevant Pages
|