Walt Mankowski on 26 Mar 2008 07:33:43 -0700 |
On Wed, Mar 26, 2008 at 10:11:35AM -0400, Hans Dieter Pearcey wrote: > On Wed, Mar 26, 2008 at 10:03:11AM -0400, Eric Roode wrote: > > Does anyone know a good way to get the current locale's time zone, without > > relying on any non-core modules? > > see how DateTime::TimeZone::Local does it DateTime::TimeZone::Local::Win32.pm gets it out of the registry from HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation\\StandardName. Maybe there's a StandardAbbev in there, too? Another thought would be to use cygwin's date(1) command directly: % perl -le '$TZ = `date +%Z`; chomp $TZ; print $TZ' EDT Walt Attachment:
signature.asc
|
|