This patch will fix two problems in Date::Manip 5.07.  There is a problem
with the way the timezone is determined on some machines (especially if
the environment variable TZ is not set appropriately).  Also, some deltas
are returned in a strange "+0:0:-+0:1:0:0" format where there are two signs.
This is due to a "feature" in perl which is returning "-0" to some math
operations rather than 0.

*** Manip.pm	Tue Dec 10 13:23:00 1996
--- Manip.pm	Thu Jan  9 10:53:34 1997
***************
*** 1569,1614 ****
  }
  
  sub Date_TimeZone {
!   my($null,$tz)=();
  
!   $tz="";
  
!   if (defined $Date::Manip::TZ) {
!     $tz=$Date::Manip::TZ;
!     return $tz  if (defined $Date::Manip::Zone{lc($tz)} or $tz=~/^[+-]\d{4}/);
!   }
! 
!   if (exists $ENV{"TZ"}) {
!     $tz=$ENV{"TZ"};
!     return $tz  if (defined $Date::Manip::Zone{lc($tz)} or $tz=~/^[+-]\d{4}/);
!   }
! 
!   if (defined $main::TZ) {
!     $tz=$main::TZ;
!     return $tz  if (defined $Date::Manip::Zone{lc($tz)} or $tz=~/^[+-]\d{4}/);
!   }
! 
!   if (-s "/etc/TIMEZONE") {
      ($null,$tz) = split (/\=/,`grep ^TZ /etc/TIMEZONE`);
      chomp($tz);
!     $tz=~ s/\s*//;
!     return $tz  if (defined $Date::Manip::Zone{lc($tz)} or $tz=~/^[+-]\d{4}/);
    }
! 
!   # The date command doesn't work on NT
!   if (defined $ENV{OS}  and  $ENV{OS} ne 'Windows_NT') {
!     $tz = `date`;
      chomp($tz);
      $tz=(split(/\s+/,$tz))[4];
      return $tz  if (defined $Date::Manip::Zone{lc($tz)} or $tz=~/^[+-]\d{4}/);
    }
  
-   $tz=$Date::Manip::TZ;
-   if (! defined $Date::Manip::Zone{lc($tz)} and $tz!~/^[+-]\d{4}/) {
      die "ERROR: Date::Manip unable to determine TimeZone.\n";
    }
-   return $tz;
- }
  
  sub Date_Init {
    my($language,$format,$tz,$convtz,@args)=@_;
--- 1569,1613 ----
  }
  
  sub Date_TimeZone {
!   my($null,$tz,@tz,$std,$dst,$time,$isdst)=();
  
!   # Get timezones from all of the relevant places
  
!   push(@tz,$Date::Manip::TZ)  if (defined $Date::Manip::TZ);  # TZ config var
!   push(@tz,$ENV{"TZ"})        if (exists $ENV{"TZ"});         # TZ environ var
!   push(@tz,$main::TZ)         if (defined $main::TZ);         # $main::TZ
!   if (-s "/etc/TIMEZONE") {                                   # /etc/TIMEZONE
      ($null,$tz) = split (/\=/,`grep ^TZ /etc/TIMEZONE`);
      chomp($tz);
!     $tz=~ s/\s+//g;
!     push(@tz,$tz);
    }
!   unless (defined $ENV{OS}  and  $ENV{OS} ne 'Windows_NT') {  # date command
!     $tz = `date`;                                             #  not on NT!
      chomp($tz);
      $tz=(split(/\s+/,$tz))[4];
+     push(@tz,$tz);
+   }
+ 
+   # Now parse each one to find the first valid one.
+   foreach $tz (@tz) {
      return $tz  if (defined $Date::Manip::Zone{lc($tz)} or $tz=~/^[+-]\d{4}/);
+ 
+     # Handle STD#DST# format
+     if ($tz =~ /^([a-z]+)\d([a-z]+)\d?$/i) {
+       ($std,$dst)=($1,$2);
+       next  if (! defined $Date::Manip::Zone{lc($std)} or
+                 ! defined $Date::Manip::Zone{lc($dst)});
+       $time = time();
+       ($null,$null,$null,$null,$null,$null,$null,$null,$isdst) =
+         localtime($time);
+       return $dst  if ($isdst);
+       return $std;
+     }
    }
  
      die "ERROR: Date::Manip unable to determine TimeZone.\n";
    }
  
  sub Date_Init {
    my($language,$format,$tz,$convtz,@args)=@_;
***************
*** 2077,2082 ****
--- 2076,2083 ----
      ($Date::Manip::ZoneExp,%Date::Manip::Zone)=
        &Date_Regexp("$zonesrfc $zones","sort,lc,under,back,opt,PRE,POST",
                     "keys");
+     # In order to handle "US/Eastern", quote "/" characters.
+     $Date::Manip::ZoneExp =~ s|/|\/|g;
      $Date::Manip::TZ=&Date_TimeZone;
  
      # Date::Manip:: misc. variables
***************
*** 2409,2414 ****
--- 2410,2418 ----
    $y    = ($tmp=int($mon/12));           # convert m to y
    $mon -= $tmp*12;
  
+   $y=0    if ($y eq "-0");               # get around silly -0 problem
+   $mon=0  if ($mon eq "-0");
+ 
    # Do the day/hour/min/sec part
  
    $s += $d*$len*60 + $h*3600 + $m*60;    # convert d/h/m to s
***************
*** 2425,2432 ****
    $h  = ($tmp=int($m/60));               # convert m to h
    $m -= $tmp*60;
  
!   # Only include the 2nd sign if necessary
    $sign1=$sign2  if ($y==0 and $mon==0);
    $sign2=""  if ($sign1 eq $sign2  and  ! $Date::Manip::DeltaSigns);
  
    if ($Date::Manip::DeltaSigns) {
--- 2429,2442 ----
    $h  = ($tmp=int($m/60));               # convert m to h
    $m -= $tmp*60;
  
!   $d=0    if ($d eq "-0");               # get around silly -0 problem
!   $h=0    if ($h eq "-0");
!   $m=0    if ($m eq "-0");
!   $s=0    if ($s eq "-0");
! 
!   # Only include two signs if necessary
    $sign1=$sign2  if ($y==0 and $mon==0);
+   $sign2=$sign1  if ($d==0 and $h==0 and $m==0 and $s==0);
    $sign2=""  if ($sign1 eq $sign2  and  ! $Date::Manip::DeltaSigns);
  
    if ($Date::Manip::DeltaSigns) {
