Package: gpscorrelate
Version: 1.5-1+b2
Severity: important
Tags: patch
Negative timezone adjustments with minutes are not handled correctly.
The minute piece should have the same sign as the hour piece, but it
is always positive due to the way it is parsed.
The attached patch should fix the problem for both the cli and gui
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-k7
Locale: LANG=en_US.ISO8859-1, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Versions of packages gpscorrelate depends on:
ii libc6 2.6.1-1+b1GNU C Library: Shared libraries
ii libexiv2-0 0.15-1EXIF/IPTC metadata manipulation li
ii libgcc11:4.2.1-4 GCC support library
ii libstdc++6 4.2.1-4 The GNU Standard C++ Library v3
ii libxml22.6.29.dfsg-1 GNOME XML library
gpscorrelate recommends no packages.
-- no debconf information
--- orig/gpscorrelate-1.5/main-command.c 2006-09-02 05:27:00.0 -0400
+++ gpscorrelate-1.5/main-command.c 2007-09-26 03:02:44.0 -0400
@@ -307,6 +307,8 @@
{
/* Found colon. Split into two. */
sscanf(TimeAdjustment, %d:%d, TimeZoneHours, TimeZoneMins);
+ if (TimeZoneHours 0)
+ TimeZoneMins *= -1;
} else {
/* No colon. Just parse. */
TimeZoneHours = atoi(TimeAdjustment);
--- orig/gpscorrelate-1.5/gui.c 2006-09-02 05:27:00.0 -0400
+++ gpscorrelate-1.5/gui.c 2007-09-26 03:03:25.0 -0400
@@ -922,6 +922,8 @@
{
/* Found colon. Split into two. */
sscanf(TZString, %d:%d, Options.TimeZoneHours, Options.TimeZoneMins);
+ if (Options.TimeZoneHours 0)
+ Options.TimeZoneMins *= -1;
} else {
/* No colon. Just parse. */
Options.TimeZoneHours = atoi(TZString);