Bart Lateur <[EMAIL PROTECTED]> writes:

> As for the parameter's format: GMT is easy, you can pass "GMT" (or
> "+0000"). For localtime(), you often don't explicitely know the time
> zone and Daylight savings Time rule, so this looks like a good candidate
> for undef.

The string "GMT" is technically wrong.

I'm opposed to allowing one to pass in any sort of string for time zone
information; if you allow "GMT", people are going to expect to be able to
use "EST", and who knows what they actually mean.  If you want GMT, pass
an offset of 0.

Be careful about time zone offsets, btw, if the interface is going to
support them.  +0700 is *not* "700 minutes"; it's 7 hours and 0 minutes.
And there are half-hour time zones.  This is an area where there's a *lot*
of potential confusion; people in Newfoundland are going to expect to be
able to pass in -0230 and have that work, and that's interestingly hard.

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

Reply via email to