On Wed, 9 Aug 2000 22:57:34 -0500, Jonathan Scott Duff wrote:

>By "local timezone" do you mean that some sort of inspection happens to
>determine the local timezone and the date() intrinsically knows about it?
>What about daylight savings time?  I presume the ability to specify an
>offset from GMT will be built in to date()?  And I still think it would
>be a good idea to let the user somehow provide an anonymous sub to date()
>that will tell date() the proper offset from GMT for "localtime" if
>we're going to support that concept at all.

Indeed. The only built-in timezone (and daylight savings time, which is
technically the same as a time zone) it really needs, is that of the
current lcoaltime(). gmtime() is no offset.

For the particular case where I needed this, where the server in another
time zone than me, I know the data for the time zone and daylight
savings time, so I can pass that data myself.

But I have some doubt if you actually need to be able to pass this
function a sub ref (AKA a callback). For most of the time, this will be
a constant, so passing a constant in the form of "+0200" should be
possible as well.

I would put all other time zone processing, apart from the local
system's localtime() time zone, and including the callback functions, in
a module.

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.

-- 
        Bart.

Reply via email to