On Thu, Jan 26, 2012 at 10:27 PM, Barry Brevik <bbre...@stellarmicro.com> wrote: > I'm on Windows Perl 5.8.8 and I'm writing an app that needs to deal with > daylight savings time. The date is an RFC 822 formatted date which looks > like this "Wed, 03 Sep 2008 08:58:27 -0800", and what I'm looking for is > the "-0800" part which changes based on the daylight savings time state. > > I want something light weight (rather not use a module) and it only has > to deal with the PST timezone. > > Has anyone found a Win32:: method that will retrieve the DST state from > Windows? Also, when the date is expressed in that format, is it supposed > to represent UTC time along with the offset? > > Barry Brevik
While I think I'd stromgly recommend using the DateTime modules for anything except the most basic time handling you could use localtime(). In list context it returns the DST state as the last value so (localtime())[-1] would give that value. AFAIK that works on Windows as well. regards Gabor -- Gabor Szabo http://szabgab.com/ _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs