Subject: | TZ croaks on DST in old-style MET-1METDST |
If, like on HP-UX 11.11 and older, your timezone looks like "MET-1METDST", Date::MANIP::TZ._get_curr_zone () fails to determine the TZ causing every other action to fail
$ echo $TZ
MET-1METDST
$ cat /etc/TIMEZONE
TZ=MET-1METDST
export TZ
$ date '+%Z'
METDST
Which, in _get_curr_zone (), results in the final «foreach me $zone (@zone) {» loop to
Check env (MET-1METDST)
Check file (MET-1METDST)
Check command (METDST)
Check main ()
Check env (MET-1METDST)
Check file (MET-1METDST)
Check command (METDST)
Check main ()
Check env (MET-1METDST)
Check file (MET-1METDST)
Check command (METDST)
Stripping "dst" from zone, like
foreach my $zone (@zone) {
$zone = lc($zone);
# OpenUNIX puts a colon at the start
$zone =~ s/^://;
$zone =~ s/dst$//; # Strip DST from zones like MET-1METDST (METDST)
# dstflag is set from localtime, so ignore dst in $TZ
# If we got a zone name/alias
$currzone = $self->_zone($zone);
=>
All tests successful.
Files=184, Tests=4101, 251 wallclock secs ( 2.97 usr 0.91 sys + 234.02 cusr 15.55 csys = 253.45 CPU)
Result: PASS
HP-UX 11.11/64 U rp3410/64 PA8800/800(2) pa-2.0 4094 Mb
This is perl 5, version 14, subversion 2 (v5.14.2) built for PA-RISC2.0-LP64