Author Topic: Closed: Timezone on ingest  (Read 2780 times)

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Closed: Timezone on ingest
« on: July 25, 2014, 01:57:39 AM »
Upon ingest, PM incorrectly sets the timezone for the IPTC:TimeCreated and XMP:DateCreated tags, while the timezone offset is correctly used, the daylight savings setting that was in effect isn't. Meaning that during summertime, all timezone information on these datetimes is one hour off…

Note this only goes wrong for the cameras that have a separate setting for timezone (offset) and daylightsavings (e.g., at least all modern Nikon cameras and perhaps some newer Canons as well). Can this please be fixed?
« Last Edit: April 25, 2019, 08:11:29 AM by Hayo Baan »
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24764
    • View Profile
    • Camera Bits, Inc.
Re: Timezone on ingest
« Reply #1 on: July 25, 2014, 09:08:59 AM »
Hayo,

Upon ingest, PM incorrectly sets the timezone for the IPTC:TimeCreated and XMP:DateCreated tags, while the timezone offset is correctly used, the daylight savings setting that was in effect isn't. Meaning that during summertime, all timezone information on these datetimes is one hour off…

Note this only goes wrong for the cameras that have a separate setting for timezone (offset) and daylightsavings (e.g., at least all modern Nikon cameras and perhaps some newer Canons as well). Can this please be fixed?

Does the EXIF information for the Capture Time contain the time zone and daylight savings information in it?  Can you share a sample image?

-Kirk

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Timezone on ingest
« Reply #2 on: July 25, 2014, 12:33:20 PM »
Hi Kirk,

Both the timezone and the daylightsavings information is actually in the makernotes (only). But as you (correctly) determine the timezone from the makernotes, the daylightsavings should be taken into account as well.

I have uploaded 2 sets of files (nef and jpg each), one set is straight from camera (HRB_....) and the other is after ingest (ING_....). This is the output from exiftool with the relevant tags selected:
Code: [Select]
$ exiftool -G0:1 -a -Exif:DateTimeOriginal -IPTC:DateCreated -IPTC:TimeCreated -XMP:DateCreated -Timezone -Daylightsavings HRB_6342.NEF ING_6342.nef HRB_6343.JPG ING_6343.jpg
======== HRB_6342.NEF
[EXIF:ExifIFD]  Date/Time Original              : 2014:07:25 21:10:33
[EXIF:IFD0]     Date/Time Original              : 2014:07:25 21:10:33
[MakerNotes:Nikon] Timezone                     : +01:00
[MakerNotes:Nikon] Daylight Savings             : Yes
======== ING_6342.nef
[EXIF:ExifIFD]  Date/Time Original              : 2014:07:25 21:10:33
[EXIF:IFD0]     Date/Time Original              : 2014:07:25 21:10:33
[IPTC]          Date Created                    : 2014:07:25
[IPTC]          Time Created                    : 21:10:33+01:00
[XMP:XMP-photoshop] Date Created                : 2014:07:25 21:10:33+01:00
[MakerNotes:Nikon] Timezone                     : +01:00
[MakerNotes:Nikon] Daylight Savings             : Yes
======== HRB_6343.JPG
[EXIF:ExifIFD]  Date/Time Original              : 2014:07:25 21:11:01
[MakerNotes:Nikon] Timezone                     : +01:00
[MakerNotes:Nikon] Daylight Savings             : Yes
======== ING_6343.jpg
[EXIF:ExifIFD]  Date/Time Original              : 2014:07:25 21:11:01
[IPTC]          Date Created                    : 2014:07:25
[IPTC]          Time Created                    : 21:11:01+01:00
[XMP:XMP-photoshop] Date Created                : 2014:07:25 21:11:01+01:00
[MakerNotes:Nikon] Timezone                     : +01:00
[MakerNotes:Nikon] Daylight Savings             : Yes
    4 image files read

On the ingested images, the timezone info added to the IPTC:TimeCreated and XMP:DateCreated should be +02:00, not +01:00.

On a related note, if the camera does not provide the timezone/dst info, it looks as if the local timezone is used, but I think PM should not fill one in at all in these cases! (because there's too big a chance that it is in fact wrong!

If you need more samples, let me know.

Cheers,
Hayo
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline dennis

  • President
  • Camera Bits Staff
  • Sr. Member
  • *****
  • Posts: 462
    • View Profile
    • Camera Bits, Inc.
Re: Timezone on ingest
« Reply #3 on: August 12, 2014, 04:18:35 PM »
Hi Hayo,

I'm fixing this.  Turns out that Nikon doesn't adjust its Maker Note timezone to account for daylight savings (e.g. for us in Oregon the timezone is always -8 regardless of daylight savings).  So it is indeed necessary to add 1 hour if daylight savings is on for Nikon cameras.

Canon, on the other hand, does compensate for daylight savings.  On a 5D MkIII if you set the timezone to -8 but turn on daylight savings, then it writes -7 into the timezone field, so no further compensation is needed.

Of course this timezone / daylight savings info is only stored in the Maker note and I've only seen it on recent cameras where there is a user interface on the camera setup to set this up.  And, as I've mentioned before, once you load an image into something like Photoshop this maker note will go bye-bye when saving.  But I will try to preserve as much info as possible in the XMP.

======== orig/PT0A3343.CR2
[EXIF:ExifIFD]  Date/Time Original              : 2014:08:11 14:14:33
[MakerNotes:Canon] Time Zone                    : -08:00
[MakerNotes:Canon] Daylight Savings             : Off

======== orig/PT0A3344.CR2
[EXIF:ExifIFD]  Date/Time Original              : 2014:08:11 14:14:41
[MakerNotes:Canon] Time Zone                    : -07:00
[MakerNotes:Canon] Daylight Savings             : On

Hope that helps!

Regards,

--dennis

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Timezone on ingest
« Reply #4 on: August 13, 2014, 12:42:41 AM »
Hi Dennis,

Excellent! Interesting to see Canon and Nikon do things differently (again). The Canon cameras I have shot with didn't have any timezone/dst info in them so I couldn't verify that. The fact that the makernote info gets lost somewhere down the track is no problem at all; by that time the Ingest will already have populated the timezone offset info in the relevant IPTC and XMP tags.

To make sure we are now on the same page:
  • You'll adjust the code to make a correction to the timezone offset when daylight savings is active (for images from Nikon cameras)
  • You will not set the timezone offset for images that do not have timezone info

On a different topic, have you already heard from Kirk I likely have found a solution for the faulty crop marks problem?
Quote
…However, in my research to find a solution for the crop issue, I did find something interesting that may help to solve the issue of the sensor size. So far every DNG I tested has the EXIF tag DefaultCropSize (and DefaultCropOrigin, but you don't need that), this value corresponds exactly to the image at un-cropped size (at least for my images). This worked even for jpgs I converted to DNG! So I think the solution would be in using this entry, would it not?

Note: I'm always using full sized previews (but that should almost be a given when using PM), so with other sized DNG previews things may be slightly different (but doable).

Cheers,
Hayo
Hayo Baan - Photography
Web: www.hayobaan.nl