Re: timezone issue with gettimeofday and localtime

2010-10-03 Thread Shlomi Fish
Hi JP, some comments on your code. On Saturday 02 October 2010 14:25:10 JP wrote: > Hi all, > > ===[ The script ]= > #!/usr/bin/perl > > use warnings; > use strict; > > use Time::HiRes qw(gettimeofday); > > my ( $seconds, $usec, $sec, $min, $hour, $day, $month, $year ); You shouldn't

timezone issue with gettimeofday and localtime

2010-10-03 Thread JP
Hi all, I am having some trouble with time functions in Perl that correct their reading for the appropriate timezone. I have minimized my problem into the example script at the bottom of this message, where: 1. I print a microsecond resolution timestamp for the current time; 2. I read