Skip Menu |

This queue is for tickets about the Date-Manip CPAN distribution.

Report information
The Basics
Id: 104141
Status: resolved
Priority: 0/
Queue: Date-Manip

People
Owner: Nobody in particular
Requestors: HMBRAND [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: 6.49



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
Well, I can't just arbitrarily strip off a DST since there are some valid timezones that end in DST that that would kill. For example: BDST BDT-6BDST I'd rather add in aliases for the HP/UX timezones that are non-standard. It appears from the google search that I did (and unfortunately, I do not have access to an HP/UX machine to verify this), it appears that the file: /usr/lib/tztab contains a list of all of the timezones used by HP/UX. Could you send me a copy of that file (to sbeck@cpan.org) and I'll then add aliases. If that proves to be impossible, I'll investigate testing both the string and the string with DST stripped so I don't blow away existing zones, but I'm hoping for a more intelligent solution. Thanks
Aliases have been added for all HP-UX timezones. This will be in the next release (6.50).