in reply to RE: (jcwren) Re: Time::CTime::strftime won't print Timezones...
in thread Time::CTime::strftime won't print Timezones...

The magic %ENV gives you access to environmental variables:
use POSIX; $ENV{TZ} = 'KTZ'; # Kinakuta Time Zone print strftime('%l:%M:%S %p %Z, %A %B %o, %Y', localtime($time));
Easy!
  • Comment on RE: RE: (jcwren) Re: Time::CTime::strftime won't print Timezones...
  • Download Code

Replies are listed 'Best First'.
RE: RE: RE: (jcwren) Re: Time::CTime::strftime won't print Timezones...
by SamQi (Beadle) on Oct 11, 2000 at 19:21 UTC
    Well...what I want to be able to do is write this script so that it is fairly hands-off as far as configuration. Basically, you put it in your cgi-bin and it runs...properly. I suppose for now that
    $ENV{TZ} = `date +%Z`;
    
    Will suffice.
    Thanks for the advice, guys!