Package: jhead Version: 2.70-1 Severity: normal The man page incorrectly describes the format for giving a date and time to -da:
For sub-day adjustments, a time of day can also be included, by specifying yyyy:nn:dd+hh:mm or yyyy:mm:dd+hh:mm:ss An hh:mm or hh:mm:ss specification seems to have no effect. For example: $ jhead DSCN0073.JPG | grep Date/Time Date/Time : 2006:09:26 06:28:58 /* baseline to compare against */ $ jhead -da"2007:07:29+01:00:00-2007:07:29+00:00:00" DSCN0073.JPG /* should have postponed exif time by one hour... */ $ jhead DSCN0073.JPG | grep Date/Time Date/Time : 2006:09:26 06:28:58 /* oh no, same time as before */ /* the function jhead.c:ParseCmdDate() sscanf's using / as separator */ $ jhead -da"2007:07:29/01:00:00-2007:07:29/00:00:00" DSCN0073.JPG Modified: DSCN0073.JPG /* a good omen */ $ jhead DSCN0073.JPG | grep Date/Time Date/Time : 2006:09:26 07:28:58 /* one hour later (which is right) */ The problem is that jhead.c:ParseCmdDate() has this sscanf format: a = sscanf(DateSpecified, "%d:%d:%d/%d:%d:%d", ... So, according to the code, the date has to be separated from the time by a /, whereas according to the man entry, it has to be separated by a +. If one wants to change the man page (perhaps the simpler choice), here is the simple patch: --- jhead-2.70/jhead.1 2007-07-29 02:13:08.386466826 -0400 +++ jhead-2.70/jhead.1 2007-07-29 02:14:30.567119164 -0400 @@ -199,7 +199,7 @@ how many days the timestamp needs to be adjusted by, including leap years and daylight savings time changes. The dates are specified as yyyy:mm:dd. For sub-day adjustments, a time of day can also -be included, by specifying yyyy:nn:dd+hh:mm or yyyy:mm:dd+hh:mm:ss +be included, by specifying yyyy:nn:dd/hh:mm or yyyy:mm:dd/hh:mm:ss Examples: @@ -209,7 +209,7 @@ Default camera date is 2002:01:01, and date was reset on 2005:05:29 at 11:21 am .br -jhead -da2005:05:29+11:21-2002:01:01 +jhead -da2005:05:29/11:21-2002:01:01 .TP .B \-ts Sets the time stored in the Exif header to what is specified on the command line. [I built and installed the Debian unstable version of jhead to see whether the problem persists, and it does, so I'm reporting the problem on the Debian BTS even though I run an Ubuntu system.] -- System Information: Debian Release: 4.0 APT prefers feisty-updates APT policy: (500, 'feisty-updates'), (500, 'feisty-security'), (500, 'feisty') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.20-16-generic Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Versions of packages jhead depends on: ii libc6 2.5-0ubuntu14 GNU C Library: Shared libraries ii libjpeg-progs 6b-13 Programs for manipulating JPEG fil jhead recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]