Kevin Kenny wrote:
> 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
OK, I shouldn't have set the starting value with [clock seconds]. But if
the starting value represents a local time, not obtained from TCL
build-in commands, then in my opinion the algoritm works.
Received on Tue Jan 3 03:09:57 2006