Package: gpscorrelate / 1.6.1-7

20-timestap-fixes.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Fix incorrect GPSDateStamp format.
Author: HÃ¥kon Stordahl <hakon@stordahl.org>
Last-Update: 2009-05-21

--- gpscorrelate-1.6.0.orig/exif-gps.cpp
+++ gpscorrelate-1.6.0/exif-gps.cpp
@@ -628,13 +628,11 @@ int WriteGPSData(char* File, struct GPSP
 	ExifToWrite.add(Exiv2::ExifKey("Exif.GPSInfo.GPSTimeStamp"), Value.get());
 
 	// And we should also do a datestamp.
-	Value = Exiv2::Value::create(Exiv2::signedRational);
-	snprintf(ScratchBuf, 100, "%d/1 %d/1 %d/1",
+	snprintf(ScratchBuf, 100, "%04d:%02d:%02d",
 			TimeStamp.tm_year + 1900,
 			TimeStamp.tm_mon + 1,
 			TimeStamp.tm_mday);
-	Value->read(ScratchBuf);
-	ExifToWrite.add(Exiv2::ExifKey("Exif.GPSInfo.GPSDateStamp"), Value.get());
+	ExifToWrite["Exif.GPSInfo.GPSDateStamp"] = ScratchBuf;
 
 	// Write the data to file.
 	Image->writeMetadata();