RE: Time zones?

2005-11-04 Thread Jason Bodnar
#!/usr/bin/perl use DateTime::Format::Strptime; my $parser = new DateTime::Format::Strptime(pattern => '%d-%b-%Y %H:%M %Z', on_error => 'croak'); my $dt = $parser->parse_datetime("30-Oct-2005 01:04 America/Los_Angeles"); __END__ $ perl test.pl I don't

Re: Time zones?

2005-11-04 Thread Jason Bodnar
Thanks for the clarification. I dropped the %Z at the end of my pattern and put time_zone => 'America/Los_Angeles' in the ctor and everything works fine. Thanks, Jason On Sat, 05 Nov 2005 09:48:55 +1100, Rick Measham wrote > Jason Bodnar wrote: > > my $dt = $parser->parse_datetime("30-Oct-2005 0

RE: Time zones?

2005-11-04 Thread Hill, Ronald
Hi Jason, Jason Bodnar wrote: > #!/usr/bin/perl > > use DateTime::Format::Strptime; > my $parser = new DateTime::Format::Strptime(pattern => '%d-%b-%Y > %H:%M %Z', on_error => > 'croak'); my $dt = $parser->parse_datetime("30-Oct-2005 01:04 > America/Los

RE: Time zones?

2005-11-04 Thread Hill, Ronald
Hi Jason, Jason Bodnar wrote: > DateTime complains that PST is ambiguous so I tried replacing PST with > 'US/Pacific', 'America/Los_Angeles' and 'PST8PDT' but DateTime says > it doesn't recognise [sic] any of those. So what timezone label will > DateTime accept for Pacific Standard Time? Odd, Ame

Re: Time zones?

2005-11-05 Thread Rick Measham
Jason Bodnar wrote: my $dt = $parser->parse_datetime("30-Oct-2005 01:04 America/Los_Angeles"); On Fri, 4 Nov 2005 14:09:14 -0800, Hill, Ronald wrote my $dt = DateTime->now( time_zone => 'America/Los_Angeles'); You're both talking about completely different things. As per previous email, yo

Re: Time zones?

2005-11-05 Thread Rick Measham
Jason Bodnar wrote: I'm using DateTime and DateTime::Format::Strptime to convert some third-party data into MySQL-compatible formats and changing the time zone to GMT. The data had PDT as the time zone until this past weekend when Daylight Savings Time ended and now has PST. DateTime complains th

Re: Time Zones: Was Re: Grand Unified Theory of Date/Time modules

2001-05-06 Thread Abhijit Menon-Sen
On 2001-05-06 11:15:37, [EMAIL PROTECTED] wrote: > > > Now is about 20010506T073000+0530 localtime [...] > > Is this the fairly standard (or at least conventional) way to deal > with [timezones]? The "Z" or [+-]offset scheme I described is the ISO 8601 way to deal with it. As far as I know, the

Re: Time Zones: Was Re: Grand Unified Theory of Date/Time modules

2001-05-06 Thread srl
On 6 May 2001, Rich Bowen wrote: > On Sun, 6 May 2001 08:11:02 +0530, Abhijit Menon-Sen said: > > > On 2001-05-05 20:58:11, [EMAIL PROTECTED] wrote: > > > > > > which date format are you recommending that we use as the "common > > > language"? > > > > datetime := date "T" time > > >

Re: Time Zones: Was Re: Grand Unified Theory of Date/Time modules

2001-05-06 Thread srl
On Sun, 6 May 2001, Abhijit Menon-Sen wrote: > On 2001-05-06 11:15:37, [EMAIL PROTECTED] wrote: > > > > > Now is about 20010506T073000+0530 localtime [...] > > > > Is this the fairly standard (or at least conventional) way to deal > > with [timezones]? > > The "Z" or [+-]offset scheme I descri