Hi,

I'm having some trouble understanding a few parameters in the TZ database - 
everybody knows that. 
I'm a developer, in the field of astronomy and celestial mechanics. But I 
encountered a problem relative to the relation between Local and UTC time in 
one of my applications.
So, I picked up TZ, and tried to analize the cities pm files ( the code must be 
adapted, so I need the raw data ).

The long list is compreensible. The problem is the end. For example, for 
Europe/Lisbon:

my $last_observance = bless( {
  'format' => 'WE%sT',
  'gmtoff' => '0:00',
  'local_start_datetime' => bless( {
    'formatter' => undef,
    'local_rd_days' => 728749,
    'local_rd_secs' => 7200,
    'offset_modifier' => 0,
    'rd_nanosecs' => 0,
    'tz' => bless( {
      'name' => 'floating',
      'offset' => 0
    }, 'DateTime::TimeZone::Floating' ),
    'utc_rd_days' => 728749,
    'utc_rd_secs' => 7200,
    'utc_year' => 1997
  }, 'DateTime' ),
  'offset_from_std' => 0,
  'offset_from_utc' => 0,
  'until' => [],
  'utc_start_datetime' => bless( {
    'formatter' => undef,
    'local_rd_days' => 728749,
    'local_rd_secs' => 3600,
    'offset_modifier' => 0,
    'rd_nanosecs' => 0,
    'tz' => bless( {
      'name' => 'floating',
      'offset' => 0
    }, 'DateTime::TimeZone::Floating' ),
    'utc_rd_days' => 728749,
    'utc_rd_secs' => 3600,
    'utc_year' => 1997
  }, 'DateTime' )
}, 'DateTime::TimeZone::OlsonDB::Observance' )
;
sub _last_observance { $last_observance }

my $rules = [
  bless( {
    'at' => '1:00u',
    'from' => '1996',
    'in' => 'Oct',
    'letter' => '',
    'name' => 'EU',
    'offset_from_std' => 0,
    'on' => 'lastSun',
    'save' => '0',
    'to' => 'max',
    'type' => undef
  }, 'DateTime::TimeZone::OlsonDB::Rule' ),
  bless( {
    'at' => '1:00u',
    'from' => '1981',
    'in' => 'Mar',
    'letter' => 'S',
    'name' => 'EU',
    'offset_from_std' => 3600,
    'on' => 'lastSun',
    'save' => '1:00',
    'to' => 'max',
    'type' => undef
  }, 'DateTime::TimeZone::OlsonDB::Rule' )
]
;

The rules, are almost readable: for instance DST will start ( even if there's 
noreference to "start" ) in the last Sunday of March of any year equal or 
greater than 1981. But, at what time? The rule is:

      Continental Portugal > UTC+1 from the last Sunday in March at 01:00 to 
the last Sunday in October at 02:00 Europe/Lisbon 


How do we figure this from the above ? - that I don't understand ( I must be 
blind or tired... ); and other situations with other values occurr with 
different countries.
Can someone explain me the calculations regarding every fields to get to the 
rule FROM THE PM CITY FILE ( this is important ! )? I would appreciate it very 
much - and it would save most of my time. 

Kind regards,

Rui Miguel Fernandes
Porto - Portugal

Reply via email to