Khan, Moin wrote: > I am getting the error as follows: > use Date::Manip; > > Server uptime is 20020903073500.000000-420ERROR: Date::Manip unable to > determine TimeZone. > Date::Manip::Date_TimeZone called at D:/Perl/lib/Date/Manip.pm > line 627 > Date::Manip::Date_Init() called at D:/Perl/lib/Date/Manip.pm > line 745 > Date::Manip::ParseDateString(20020903073500) called at > D:/Perl/lib/Date/Manip.pm line 1447 > Date::Manip::DateCalc(20020903073500, '+ 300 minutes') called at > uptime.pl line 42
use POSIX; use Time::Local; $_ = '20020903073500.000000-420'; my @a = (/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})\.\d+([+-]\d+)$/); my $timelocal = Time::Local::timelocal ($a[5], $a[4], $a[3], $a[2], $a[1] - 1, $a[0] - 1900); print &strftime ("%a, %d-%b-%Y %H:%M:%S\n", gmtime $timelocal); $timelocal += $a[6] * 60; print &strftime ("%a, %d-%b-%Y %H:%M:%S\n", gmtime $timelocal); __END__ Result: Tue, 03-Sep-2002 14:35:00 Tue, 03-Sep-2002 07:35:00 -- ,-/- __ _ _ $Bill Luebkert ICQ=162126130 (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/ _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs