Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime-TimeZone CPAN distribution.

Report information
The Basics
Id: 62745
Status: resolved
Priority: 0/
Queue: DateTime-TimeZone

People
Owner: Nobody in particular
Requestors: ocheyette [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: DateTime::TimeZone::Local on cygwin
Date: Fri, 5 Nov 2010 13:46:01 -0700 (PDT)
To: bug-DateTime-TimeZone [...] rt.cpan.org
From: Oren Cheyette <ocheyette [...] gmail.com>
Attempting $tz = DateTime::TimeZone->new(name = 'local') fails on cygwin, unless I have set TZ in the environment to an offset (e.g. "-0700"). (Oddly, setting TZ to an offset string in cygwin with setenv causes the shell "date" function to switch to GMT. It likes "PDT" but not "-0700". But that's a topic for another bug list.) I'm using the latest CPAN release (1.23). - Oren
Subject: Re: [rt.cpan.org #62745] DateTime::TimeZone::Local on cygwin
Date: Fri, 5 Nov 2010 15:52:58 -0500 (CDT)
To: Oren Cheyette via RT <bug-DateTime-TimeZone [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Fri, 5 Nov 2010, Oren Cheyette via RT wrote: Show quoted text
> $tz = DateTime::TimeZone->new(name = 'local') > fails on cygwin, unless I have set TZ in the environment to an offset (e.g. > "-0700"). (Oddly, setting TZ to an offset string in cygwin with setenv causes > the shell "date" function to switch to GMT. It likes "PDT" but not "-0700". But > that's a topic for another bug list.)
What's the failure message? My mind-reading abilities have been on the fritz lately. Basically, determining the local time zone is a bit of a guessing game, and we can't always guess right. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: DateTime::TimeZone::Local on cygwin
Date: Fri, 5 Nov 2010 13:53:30 -0700 (PDT)
To: bug-DateTime-TimeZone [...] rt.cpan.org
From: Oren Cheyette <ocheyette [...] gmail.com>
Sorry, typo, this should have read $tz = DateTime::TimeZone->new(name => 'local'); The output is "Cannot determine local time zone". Apologies for the double bug report. - Oren
Subject: Re: [rt.cpan.org #62746] Re: DateTime::TimeZone::Local on cygwin
Date: Fri, 5 Nov 2010 16:07:21 -0500 (CDT)
To: Oren Cheyette via RT <bug-DateTime-TimeZone [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Fri, 5 Nov 2010, Oren Cheyette via RT wrote: Show quoted text
> Apologies for the double bug report.
Just reply to the original ticket and it won't open a new one. /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
On Fri Nov 05 16:53:38 2010, ocheyette@gmail.com wrote: Show quoted text
> Sorry, typo, this should have read > > > $tz = DateTime::TimeZone->new(name => 'local'); > > The output is "Cannot determine local time zone". > > Apologies for the double bug report.
The local time zone can be determined in a number of different ways, but apparently none of them is working on your system. The easiest way to avoid this is to set $ENV{TZ} somewhere. If that contains a time zone name, it will be used as the local time zone.