in reply to Re: TimeZone Error?
in thread TimeZone Error?

Well, no!
This ebay site shows at the same moment the time in Europe and in USA/Pacific,
so there should not be any difference! Beside that, while
$time{brdTi1} = scalar localtime($time{brdSec}); $time{brdTi2} = scalar localtime($time{brdSec}-$time{brdOFF});
shows exact time for MEZ:
brdDay => 05 Jan 2005 brdTime => 09:50:04 brdOFF => 3600 brdSec => 1104918604 brdTi1 => Wed Jan 5 10:50:04 2005 brdTi2 => Wed Jan 5 09:50:04 2005 brdTiZo => MEZ
the same code:
$time{usaTi1} = scalar localtime($time{usaSec}); $time{usaTi2} = scalar localtime($time{usaSec}-$time{usaOFF});
for PST shows this:
usaDay => 05 Jan 2005 usaTime => 00:50:04 usaOFF => -28800 usaSec => 1104915004 usaTi1 => Wed Jan 5 09:50:04 2005 usaTi2 => Wed Jan 5 17:50:04 2005 usaTiZo => PST
Any Ideas?
Carl

Replies are listed 'Best First'.
Re^3: TimeZone Error?
by aquarium (Curate) on Jan 05, 2005 at 09:24 UTC
    is this ebay website yours or someone elses? it has the wrong concept of timezones if it's only showing an hour difference between MEZ and PST. it's definitely more than an hour time difference between Europe and Central America.
    the hardest line to type correctly is: stty erase ^H
      It is the official ebay time it must not be wrong! Carl
      Hi again
      I found the 'bug' (?):

      Time::Timezone accepts 'MEZ'
      which is the German-version of middle european time or 'met' (try:)
         $mez = tz_offset('MEZ'); # correct    $met = tz_offset('met'); # correct
      while parsedate doesn't know 'MEZ' (or 'mez),
      it gives back gmt when called with ZONE => 'MEZ':
         $gmt = parsedate( "$d $t", ZONE => 'MEZ'); #false    $met = parsedate( "$d $t", ZONE => 'MET'); #correct
      Carl