Page head image

Geotagging Issues

(0 comments)

The bad: discovering after months that the clock of the camera was set to CEST instead of UTC
The good: exiftool and some few lines of perl to the rescue!

#!/usr/bin/perl
use strict;
use Image::ExifTool;
use Date::Parse;
use POSIX;

sub fixtime { return strftime("%Y:%m:%d %H:%M:%S", gmtime(str2time($_[0], "+0200"))); }

my $fname=$ARGV[0];
if ($fname eq "") {
print "usage: exif-cest2utc filename\n";
exit(1);
}

my $et = new Image::ExifTool;
my $ef = $et->ExtractInfo($fname);

$et->SetNewValue("CreateDate", fixtime($et->GetValue("CreateDate", "Raw")));
$et->SetNewValue("DateTimeOriginal", fixtime($et->GetValue("DateTimeOriginal", "Raw")));
$et->WriteInfo($fname);

Comments

There are currently no comments

New Comment

required

required (not published)

optional