On Friday, September 5, 2003, at 09:51 AM, Dave Rolsky wrote:

Yep, you need to call it again. Whatever tzset does is something at a C
library level, not a Perl level, so the localization doesn't do anything.

Bah. Thanks for that. Does this work?


#!/usr/bin/perl -w

use strict;
use POSIX qw(tzset);
print scalar localtime, $/;
{
    local $ENV{TZ} = "Asia/Tokyo";
    tzset;
    print scalar localtime, $/;
}
tzset;
print scalar localtime, $/;

Regards,

David

--
David Wheeler                                     AIM: dwTheory
[EMAIL PROTECTED]                              ICQ: 15726394
http://www.kineticode.com/                     Yahoo!: dew7e
                                               Jabber: [EMAIL PROTECTED]
Kineticode. Setting knowledge in motion.[sm]



Reply via email to