Can anyone tell me how I can convert Eastern Daylight Savings Time to GMT. I presently do
set time [clock seconds]. Is there any way in Tcl to acheive this.
From the clock page of the Tcl manual:
If the -format argument is not specified, the format string "%a %b %d %H:%M:%S %Z %Y" is used. If the -gmt argument is present the next argument must be a boolean which if true specifies that the time will be formatted as Greenwich Mean Time. If false then the local timezone will be used as defined by the operating environment.
set gmtdate [clock format [clock seconds] -format "%H:%M:%S" -gmt 1]
set gmttime [clock scan "$gmtdate"]
I send the time to another server using
puts $sock "Date: [HttpdDate [expr $gmttime + 120]]"
the other server should get time with GMT suffix for it to recognize the format but using the above steps i get it with EDT suffix...any ideas as to how i can acheive this.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.