From: Brian E. L. <br...@us...> - 2004-08-22 23:45:34
|
Update of /cvsroot/rideplot/rideplot/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16397 Modified Files: rideplot Log Message: Modified photo adjustment so it uses system TZ to adjust photo times to match GPS data. Index: rideplot =================================================================== RCS file: /cvsroot/rideplot/rideplot/src/rideplot,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** rideplot 22 Aug 2004 22:19:27 -0000 1.7 --- rideplot 22 Aug 2004 23:45:23 -0000 1.8 *************** *** 50,54 **** # use GD; # Graphics library ! use POSIX qw( atan asin cos sin sqrt ); use Date::Calc qw( Delta_DHMS Decode_Date_US Decode_Month Add_Delta_DHMS ); use Getopt::Long; # Command line options --- 50,54 ---- # use GD; # Graphics library ! use POSIX qw( atan asin cos sin sqrt strftime); use Date::Calc qw( Delta_DHMS Decode_Date_US Decode_Month Add_Delta_DHMS ); use Getopt::Long; # Command line options *************** *** 226,230 **** sub get_photo_info { ! my $dir = shift; --- 226,232 ---- sub get_photo_info { ! my $strftime_offset = strftime "%z", localtime; ! my $tz_offset = ( $strftime_offset / 100.0 ) * (-1.0); ! my $dir = shift; *************** *** 253,260 **** # Photos have local timestamp. Change them to have GMT time ! # This is hard coded at the moment ! # The "-2" is the skew for the digital camera. ! my @ntime = Add_Delta_DHMS( @ltime, 0,7,-2,0); my $photo_timestr = sprintf ("%04d/%02d/%02d %02d:%02d:%02d" ,$ntime[0],$ntime[1],$ntime[2],$ntime[3],$ntime[4],$ntime[5]); --- 255,263 ---- # Photos have local timestamp. Change them to have GMT time ! # Get's the local timezone from the System or environment ! # The "-2" is the skew for the digital camera. Once again, this is hard coded and needs to ! # be changed. ! my @ntime = Add_Delta_DHMS( @ltime, 0,$tz_offset,-2,0); my $photo_timestr = sprintf ("%04d/%02d/%02d %02d:%02d:%02d" ,$ntime[0],$ntime[1],$ntime[2],$ntime[3],$ntime[4],$ntime[5]); |