This is what I have:
set foobar [clock format [clock seconds]]
Ideally, I'd like to get the time in this format:
Sun Oct 19 17:38:07 EDT (New York time)
I can obviously add '(New York time)'. Any suggestions how I can get the
time in the EDT timezone, and ideally in the format shown.
dave
You most likely want something like:
clock format [clock seconds] -format "%x %X %Z" \
-timezone :America/New_York -locale en_US
You'll notice that -locale deals with punctuation differences (and
details like month-first vs. day-of-month-first), while -timezone
deals specifically with time zone.
-locale and -timezone need Tcl 8.5 or later. If you're stuck
on 8.4, you can either play games with $env(TZ) or get the
'newclock' extension.
--
73 de ke9tv/2, Kevin