Author Topic: time zone issue  (Read 740 times)

boombass

  • Jr. Member
  • **
  • Posts: 19
time zone issue
« on: April 19, 2019, 05:47:35 PM »
My family and I were at Disneyland a little while ago. Some of the rides had camera that took pictures of us, but they did not include any time information. I have added the correct date and time to the images, but they are not sorting correctly in Google Photos.

Pictures from my regular cameras show a timezone of -7 in Google Photos, but exiftool shows -6. The pictures from the rides also show -6. I can manually change them in Google Photos, but I'd rather fix the file itself.

Can you show me how to do this? I want the Disney ride photos to sort in the same way as the iPhone photos when I import them into Google Photos.

Here is the output of "exiftool -s" for both types of pictures - first the picture taken by the ride (with time manually added by me) and second a picture taken with my iPhone (automatically includes time info and more):

Thanks!

Code: [Select]
FileModifyDate                  : 2019:04:06 10:15:00-06:00
FileAccessDate                  : 2019:04:19 15:38:11-06:00
FileInodeChangeDate             : 2019:04:19 15:30:23-06:00
FilePermissions                 : rw-r--r--
FileType                        : JPEG
FileTypeExtension               : jpg
MIMEType                        : image/jpeg
JFIFVersion                     : 1.01
ExifByteOrder                   : Big-endian (Motorola, MM)
Orientation                     : Horizontal (normal)
XResolution                     : 72
YResolution                     : 72
ResolutionUnit                  : inches
YCbCrPositioning                : Centered
ExifVersion                     : 0221
DateTimeOriginal                : 2019:04:06 10:15:00
ComponentsConfiguration         : Y, Cb, Cr, -
FlashpixVersion                 : 0100
ColorSpace                      : sRGB
ExifImageWidth                  : 2400
ExifImageHeight                 : 3600
SceneCaptureType                : Standard
Compression                     : JPEG (old-style)
ThumbnailOffset                 : 348
ThumbnailLength                 : 11268
CurrentIPTCDigest               : d41d8cd98f00b204e9800998ecf8427e
IPTCDigest                      : d41d8cd98f00b204e9800998ecf8427e
ImageWidth                      : 2400
ImageHeight                     : 3600
EncodingProcess                 : Baseline DCT, Huffman coding
BitsPerSample                   : 8
ColorComponents                 : 3
YCbCrSubSampling                : YCbCr4:2:0 (2 2)
ImageSize                       : 2400x3600
Megapixels                      : 8.6
ThumbnailImage                  : (Binary data 11268 bytes, use -b option to extract)

Code: [Select]
FileModifyDate                  : 2019:04:07 14:09:07-06:00
FileAccessDate                  : 2019:04:12 21:01:47-06:00
FileInodeChangeDate             : 2019:04:12 21:01:47-06:00
FilePermissions                 : rw-------
FileType                        : JPEG
FileTypeExtension               : jpg
MIMEType                        : image/jpeg
ExifByteOrder                   : Big-endian (Motorola, MM)
Make                            : Apple
Model                           : iPhone 6
Orientation                     : Horizontal (normal)
XResolution                     : 72
YResolution                     : 72
ResolutionUnit                  : inches
Software                        : 12.1.4
ModifyDate                      : 2019:04:07 13:09:07
YCbCrPositioning                : Centered
ExposureTime                    : 1/20
FNumber                         : 2.2
ExposureProgram                 : Program AE
ISO                             : 250
ExifVersion                     : 0221
DateTimeOriginal                : 2019:04:07 13:09:07
CreateDate                      : 2019:04:07 13:09:07
ComponentsConfiguration         : Y, Cb, Cr, -
ShutterSpeedValue               : 1/20
ApertureValue                   : 2.2
BrightnessValue                 : 0.2828745192
ExposureCompensation            : 0
MeteringMode                    : Multi-segment
Flash                           : Auto, Did not fire
FocalLength                     : 4.2 mm
SubjectArea                     : 1629 1221 1793 1075
RunTimeFlags                    : Valid
RunTimeValue                    : 659973548235166
RunTimeScale                    : 1000000000
RunTimeEpoch                    : 0
AccelerationVector              : -0.9930152895 -0.02364610881 0.1121716127
SubSecTimeOriginal              : 295
SubSecTimeDigitized             : 295
FlashpixVersion                 : 0100
ColorSpace                      : sRGB
ExifImageWidth                  : 3264
ExifImageHeight                 : 2448
SensingMethod                   : One-chip color area
SceneType                       : Directly photographed
ExposureMode                    : Auto
WhiteBalance                    : Auto
DigitalZoomRatio                : 1.489051095
FocalLengthIn35mmFormat         : 43 mm
SceneCaptureType                : Standard
LensInfo                        : 4.15mm f/2.2
LensMake                        : Apple
LensModel                       : iPhone 6 back camera 4.15mm f/2.2
GPSLatitudeRef                  : North
GPSLongitudeRef                 : West
GPSAltitudeRef                  : Above Sea Level
GPSTimeStamp                    : 20:09:00.72
GPSSpeedRef                     : km/h
GPSSpeed                        : 0
GPSImgDirectionRef              : True North
GPSImgDirection                 : 53.70791629
GPSDestBearingRef               : True North
GPSDestBearing                  : 53.70791629
GPSDateStamp                    : 2019:04:07
GPSHPositioningError            : 65 m
Compression                     : JPEG (old-style)
ThumbnailOffset                 : 2126
ThumbnailLength                 : 8714
ImageWidth                      : 3264
ImageHeight                     : 2448
EncodingProcess                 : Baseline DCT, Huffman coding
BitsPerSample                   : 8
ColorComponents                 : 3
YCbCrSubSampling                : YCbCr4:2:0 (2 2)
Aperture                        : 2.2
GPSAltitude                     : 38 m Above Sea Level
GPSDateTime                     : 2019:04:07 20:09:00.72Z
GPSLatitude                     : 33 deg 48' 28.20" N
GPSLongitude                    : 117 deg 55' 18.56" W
GPSPosition                     : 33 deg 48' 28.20" N, 117 deg 55' 18.56" W
ImageSize                       : 3264x2448
Megapixels                      : 8.0
RunTimeSincePowerUp             : 7 days 15:19:33
ScaleFactor35efl                : 10.4
ShutterSpeed                    : 1/20
SubSecCreateDate                : 2019:04:07 13:09:07.295
SubSecDateTimeOriginal          : 2019:04:07 13:09:07.295
ThumbnailImage                  : (Binary data 8714 bytes, use -b option to extract)
CircleOfConfusion               : 0.003 mm
FOV                             : 45.4 deg
FocalLength35efl                : 4.2 mm (35 mm equivalent: 43.0 mm)
HyperfocalDistance              : 2.70 m
LightValue                      : 5.3

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3794
Re: time zone issue
« Reply #1 on: April 20, 2019, 02:57:52 AM »
I've done a little bit of testing with Google Photos with regards to time zones and always got inconsistent results.  You can see some results with a video file here

I honestly have doubts that Goggle Photos pays any attention to time zone data in the file.

Unless someone else has some good data, I'll do some more detailed testing tomorrow.  I plan to see what happens when I upload a picture from different time zones through a VPN.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 469
    • A selection of Alan Clifford's photographs
Re: time zone issue
« Reply #2 on: April 20, 2019, 10:02:05 AM »
Unless someone else has some good data, I'll do some more detailed testing tomorrow.  I plan to see what happens when I upload a picture from different time zones through a VPN.

I'm in +1 at the moment.  Google has definitely found the correct time zone of +2 for a photo with a ton of timezone information in it that I've just uploaded.  But I don't know which it has used.

Code: [Select]
[File]          File Modification Date/Time     : 2018:11:18 23:07:56+00:00
[File]          File Access Date/Time           : 2019:04:20 14:47:17+01:00
[File]          File Inode Change Date/Time     : 2019:04:20 14:38:36+01:00
[EXIF]          Modify Date                     : 2018:09:13 11:15:42
[EXIF]          Date/Time Original              : 2018:09:13 11:15:42
[EXIF]          Create Date                     : 2018:09:13 11:15:42
[EXIF]          GPS Date Stamp                  : 2018:09:13
[XMP]           Date/Time Original              : 2018:09:13 11:15:42+02:00
[XMP]           GPS Date/Time                   : 2018:09:13 09:15:42
[Composite]     GPS Date/Time                   : 2018:09:13 09:15:42Z
[Composite]     Create Date                     : 2018:09:13 11:15:42+02:00
[Composite]     Date/Time Original              : 2018:09:13 11:15:42+02:00
[Composite]     Modify Date                     : 2018:09:13 11:15:42+02:00
[EXIF]          Offset Time                     : +02:00
[EXIF]          Offset Time Original            : +02:00
[EXIF]          Offset Time Digitized           : +02:00




Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 469
    • A selection of Alan Clifford's photographs
Re: time zone issue
« Reply #3 on: April 20, 2019, 02:03:50 PM »
I changed all the timezones away from +2, using a new photo to avoid any cache issues with deleted photos on Google, and still it reports +2.  I'm beginning to think it might be looking at gps data or the country code and being too clever for itself.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3794
Re: time zone issue
« Reply #4 on: April 20, 2019, 03:57:50 PM »
I'm prepping files to do a hopefully comprehensive test on how Google Photos deals with time stamps and TZ embedded in images.  This post will detail what I'm going to do and if anyone can see something I should change, let me know.

First, this is the list of timestamp metadata that Google Photos will read.  The GPS timestamp and FileModifyDate always seems to be the last two read, but the others seem to vary by the position it is read from the file.  I never checked to see how it dealt with time zones before, so that info isn't on the list.
EXIF:DateTimeOriginal
XMP:DateCreated
XMP:DateTimeOriginal
IPTC:DateCreated + IPTC:TimeCreated
EXIF:CreateDate
XMP:CreateDate
XMP:DateTimeDigitized
IPTC:DigitalCreationDate + IPTC:DigitalCreationTime
EXIF:ModifyDate
XMP:ModifyDate
GPS:GPSDateStamp + GPS:GPSTimeStamp2
System:FileModifyDate


I'm not going to actually check each of this, just the ones that I feel are most important.  So my test files will be
  • Control. No timestamp except for the FileModifyDate, since that can't be removed
  • IPTC DateCreated and TimeCreated.  TimeCreated must include a time zone so there isn't a no timezone option for this test
  • EXIF DateTimeOriginal. DateTimeOriginal by itself doesn't include a time zone
  • EXIF DateTimeOriginal + OffsetTimeOriginal.  OffsetTimeOriginal is the time zone tag that matches DateTimeOriginal
  • GPSDateStamp + GPSTimeStamp.  This is UTC time, so technically no time zone data is included
  • XMP-photoshop:DateCreated without time zone.  This is the XMP equivalent of the EXIF DateTimeOriginal and can be written with or without a time zone
  • XMP-photoshop:DateCreated with a time zone

I'm located on the west coast of the US and my computer is set to that time zone.  I won't be going so far as to change that so it might affect the results.

That gives me a control file and six basic tests.  I'll first upload these files locally from west coast US.  Then, I'll use a VPN to upload from a IP address in France and Japan, +02:00 and +09:00.  US and France are on DST, Japan doesn't use DST.  So that's a total of 18 files + 1 control.

As an additional test, I have copies of these set to the equivalent local times of France and Japan 2019:04:20 21:00:00+02:00 and 2019:04:21 04:00:00+09:00 respectively.  And then repeat the uploads for each location.  A total of 57 files to compare.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3794
Re: time zone issue
« Reply #5 on: April 20, 2019, 05:57:36 PM »
Still checking things and getting some weird results at times but one thing has become pretty clear and can answer boombass's question.

In order to get Google Photos to properly adjust for time zones, you can either use IPTC:DateCreated + IPTC:TimeCreated or use XMP:CreateDate as long as you include the time zone. 

I would like to point out that Disneyland, Anaheim at the date in question, the time zone would be correct at -07:00 (Disney World would be -04:00).  So boombass, are you sure you want to change the time zone to -06:00?  The iPhone DateTimeOriginal shows 2019:04:07 13:09:07 and FileModifyDate of 2019:04:07 14:09:07-06:00, which would be correct adjusting for the time zone difference (I'm assuming you're on Mountain Daylight Time -06:00 right now).  But the first one has identical DateTimeOriginal and FileModifyDate, which would be incorrect due to the time zone difference (IMO).

If you want to keep the -06:00 time zone, then I'd suggest the following command:
exiftool "-IPTC:DateCreated<FileModifyDate" "-IPTC:TimeCreated<FileModifyDate" "-XMP:CreateDate<FileModifyDate" FileOrDir

If you want to use -07:00 time zone, that would be more complicated.  I think this would work
exiftool -globaltimeshift -1 -d "%Y:%m:%d %H:%M:%S-07:00" "-IPTC:DateCreated<FileModifyDate" "-IPTC:TimeCreated<FileModifyDate" "-XMP:CreateDate<FileModifyDate" FileOrDir

I'll post the results of the time zone test later in a separate thread.  I've already spend hours on it.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

boombass

  • Jr. Member
  • **
  • Posts: 19
Re: time zone issue
« Reply #6 on: April 21, 2019, 07:24:30 AM »
I'm not sure if I want -06:00 or -07:00, but I will try both and see what happens. I am awed by the amount of work you have put into this, and I thank you.

My home time zone is currently -06:00, and Anaheim is currently -07:00. I was beginning to wonder if it mattered where I was when I downloaded the Disney supplied photos. I was at home, using my iPhone, so it knew where I was.

I will try this later today and report back. Thank you so much!

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1140
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: time zone issue
« Reply #7 on: April 21, 2019, 07:42:07 AM »
Just a remark, it looks as if your images contained GPS data. From that it is quiet straightforward to derive the timezone if not already derivable from any of the other tags. Either by the GPS location itself (requires reverse geocoding by Google, but they are definitely capable of doing this), or even simpler by subtracting the local time (from e.g. datatimeoriginal). This latter trick is one I used in the TimeZone composite tag config file (part of the full exiftool release).

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

Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 469
    • A selection of Alan Clifford's photographs
Re: time zone issue
« Reply #8 on: April 21, 2019, 04:23:15 PM »
I've put gps lontitude and latitude for Las Vegas into a photo taken in South Africa and left all the +2 timezone data intact.  Google photos puts it in Las Vegas.  Photo attached.


edit:  with a -7 timezone.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3794
Re: time zone issue
« Reply #9 on: April 21, 2019, 04:42:38 PM »
I've put gps lontitude and latitude for Las Vegas into a photo taken in South Africa and left all the +2 timezone data intact.  Google photos puts it in Las Vegas.  Photo attached.

edit:  with a -7 timezone.

Did Google photos give you a +2 or -7 timezone?

When I uploaded it, it ignored the EXIF OffsetTime tags (which I knew).  It also ignored the time zone in the XMP-exif:DateTimeOriginal (new info, taking note of that).  For me, it showed the September 6, 2019, 18:02 with a -07:00 time zone.  So it ignored the GPS time data and didn't compute any time data based upon that.   
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 469
    • A selection of Alan Clifford's photographs
Re: time zone issue
« Reply #10 on: April 21, 2019, 05:03:16 PM »
google photos gave me -7.  It must have calculated that from the latitude and longitude as there was nothing in the file to give that infirmation.

Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 469
    • A selection of Alan Clifford's photographs
Re: time zone issue
« Reply #11 on: April 21, 2019, 05:11:08 PM »
This appears to put a photo with no time zone information into Disneyland, Florida, with a timezone of -5.

exiftool p340_1183.jpg -gpslatitude="28.4099433" -gpslongitude="-81.5891393" -gpslatituderef=N -gpslongituderef=W -gpsdatestamp'<$datetimeoriginal' -gpstimestamp'<$datetimeoriginal'

@boombass you may have to change the single quotes into double quotes if you are using windows.  And, of course, the gps co-ordinates if not in Florida.


edit:  from what @stargeek says, you probably don't need gpstimestamp and gpsdatestamp but you can experiment!

Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 469
    • A selection of Alan Clifford's photographs
Re: time zone issue
« Reply #12 on: April 21, 2019, 05:41:15 PM »
A photo taken about the same time, with no location nor timezone data, show no location and a timezone of zero in Google photos.  It's currently +1 here but would have been 0 at the time the photo was taken.

So it seems to be location data, if available, and one of the many available time tags to determine the time zone including summer time adjustments.  Or maybe not.  I need to upload a photo taken in GMT plus summer time.  Maybe tomorrow.

boombass

  • Jr. Member
  • **
  • Posts: 19
Re: time zone issue
« Reply #13 on: May 11, 2019, 08:51:37 AM »
I used what @Alan Clifford suggested, minus the gpstimestamp and gpsdatestamp tags and with the actual GPS data for the rides from Google Maps, and had success! The photos sorted correctly by time and displayed the correct time zone.

This is good enough for me! Thanks for all of your help.