in reply to Daylight Savings Time twist
DateTime aims to be the difinitive perl module for working with dates and times. The DateTime::Timezone module(s) are based on the OlsenDB - the central source of information on timezones and daylight savings so they should be right. There is talk on the list about how to keep these files up to date - which will be sorted out by the time you'd need to update them :)
Try using DateTime something like this:
The PODumentation will explain how to use the $difference duration. Also note that you might have to feed a time into the new() method, but I'm sure someone else will chime in and tell you.my $realtimehere = DateTime->now; my $realtimethere = DateTime->new(time_zone => 'America/Los_Angeles'); my $difference = $realtimehere - $realtimethere;
The code is completely untested because I can't install DateTime on my mac here at the moment. Of course, read the documentation and then test it :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Daylight Savings Time twist
by BigLug (Chaplain) on Feb 07, 2003 at 12:36 UTC | |
by BigLug (Chaplain) on Feb 07, 2003 at 23:01 UTC | |
by kanwisch (Sexton) on Feb 17, 2003 at 17:24 UTC |