On Tue, 3 Nov 2009, Ronald J Kimball wrote:
Dave Rolsky wrote:
Sometimes DateTime::TimeZone thinks your local time zone is UTC. I have no
idea why it'd would be doing this. You could hack up a local copy of
DateTime::TimeZone::Local::Unix and have it spit out everything it's doing
and what it finds.
Either it's doing something wrong or your system is very oddly configured.
I've discovered that, on this system, although /etc/localtime is a copy of
/usr/share/zoneinfo/America/New_York, /etc/timezone contains 'Etc/UTC'. I
presume that qualifies as an oddly configured system. :)
That is a bit weird.
I'm not sure why sometimes DateTime::TimeZone::Local would be getting the
time zone from /etc/localtime and other times from /etc/timezone, though.
Perhaps the call to File::Find::find() in
DateTime::TimeZone::Local::Unix::_FindMatchingZoneinfoFile is failing
intermittently?
That seems unlikely. The order of the checks in DT::TZ::Local is static,
and there's no reason the find should fail sometimes and not others.
As someone else pointed, does "intermittent" really mean "when run from
different environments"?
Is it possible that sometimes when the code is run it can't actually read
/usr/share/zoneinfo for some reason?
-dave
/*============================================================
http://VegGuide.org http://blog.urth.org
Your guide to all that's veg House Absolute(ly Pointless)
============================================================*/