SamQi has asked for the wisdom of the Perl Monks concerning the following question:
I can't seem to get Time::CTime::strftime to print out the timezone for me...
I do the following:
my $time = time;
print strftime('%l:%M:%S %p, %A %B %o, %Y', localtime($time));
This works wonderfully generating out put such as:
2:40:55 PM, Tuesday October 10th, 2000
however...I want to add in the timezone.
Now I would figure I'd simply modify the template to read as such:
print strftime('%l:%M:%S %p %Z, %A %B %o, %Y', localtime($time));
However, this ends up just putting a blank space where the %Z token (which according to the perldoc is the proper token) is
Executing
$ date +%Myields the timezone...so I know it's set...
Any ideas, monks?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jcwren) Re: Time::CTime::strftime won't print Timezones...
by jcwren (Prior) on Oct 10, 2000 at 23:57 UTC | |
by SamQi (Beadle) on Oct 11, 2000 at 06:50 UTC | |
by chromatic (Archbishop) on Oct 11, 2000 at 07:42 UTC | |
by SamQi (Beadle) on Oct 11, 2000 at 19:21 UTC | |
by SamQi (Beadle) on Oct 11, 2000 at 00:09 UTC |