Adjusting the timezone on a QuickTime movie taken with a Nikon camera

Started by l.scorcia, May 23, 2025, 10:23:20 PM

Previous topic - Next topic

l.scorcia

Hi, I took a few images and QuickTime MOV files with a Nikon D3100 and on my way home I noticed it had the wrong time zone set. ExifTool promptly fixed the photos, but I'm hitting a wall with the movies.

This is an example of the original tags:

exiftool-13.30_64>exiftool.exe -s -G5 -api QuickTimeUTC "DSC_0032.MOV"
[ExifTool]      ExifToolVersion                 : 13.30
[System]        FileName                        : DSC_0032.MOV
[System]        Directory                       : C:/Users/blah/Desktop/nikon
[System]        FileSize                        : 37 MB
[System]        FileModifyDate                  : 2025:05:08 20:51:26+02:00
[System]        FileAccessDate                  : 2025:05:24 04:09:58+02:00
[System]        FileCreateDate                  : 2025:05:19 00:12:32+02:00
[System]        FilePermissions                 : -rw-rw-rw-
[MOV]           FileType                        : MOV
[MOV]           FileTypeExtension               : mov
[MOV]           MIMEType                        : video/quicktime
[MOV]           MediaDataSize                   : 37028050
[MOV]           MediaDataOffset                 : 32
[MOV-FileType]  MajorBrand                      : Apple QuickTime (.MOV/QT)
[MOV-FileType]  MinorVersion                    : 2007.9.0
[MOV-FileType]  CompatibleBrands                : qt  , niko
[MOV-Movie-MovieHeader] MovieHeaderVersion      : 0
[MOV-Movie-MovieHeader] ModifyDate              : 2025:05:08 22:51:26+02:00
[MOV-Movie-MovieHeader] TimeScale               : 24000
[MOV-Movie-MovieHeader] Duration                : 15.52 s
[MOV-Movie-MovieHeader] PreferredRate           : 1
[MOV-Movie-MovieHeader] PreferredVolume         : 100.00%
[MOV-Movie-MovieHeader] PreviewTime             : 0 s
[MOV-Movie-MovieHeader] PreviewDuration         : 0 s
[MOV-Movie-MovieHeader] PosterTime              : 0 s
[MOV-Movie-MovieHeader] SelectionTime           : 0 s
[MOV-Movie-MovieHeader] SelectionDuration       : 0 s
[MOV-Movie-MovieHeader] CurrentTime             : 0 s
[MOV-Movie-MovieHeader] NextTrackID             : 3
[MOV-Movie-Track-TrackHeader] TrackHeaderVersion: 0
[MOV-Movie-Track-TrackHeader] TrackCreateDate   : 2025:05:08 22:51:26+02:00
[MOV-Movie-Track-TrackHeader] TrackModifyDate   : 2025:05:08 22:51:26+02:00
[MOV-Movie-Track-TrackHeader] TrackID           : 1
[MOV-Movie-Track-TrackHeader] TrackDuration     : 15.52 s
[MOV-Movie-Track-TrackHeader] TrackLayer        : 0
[MOV-Movie-Track-TrackHeader] TrackVolume       : 0.00%
[MOV-Movie-Track-TrackHeader] ImageWidth        : 1920
[MOV-Movie-Track-TrackHeader] ImageHeight       : 1080
[MOV-Movie-Track-TrackHeader] MatrixStructure   : 1 0 0 0 1 0 0 0 1
[MOV-Movie-Track-Media-MediaInfo-VideoHeader] GraphicsMode: ditherCopy
[MOV-Movie-Track-Media-MediaInfo-VideoHeader] OpColor: 32768 32768 32768
[MOV-Movie-Track-Media-MediaInfo-SampleTable-VisualSampleDesc] CompressorID: avc1
[MOV-Movie-Track-Media-MediaInfo-SampleTable-VisualSampleDesc] SourceImageWidth: 1920
[MOV-Movie-Track-Media-MediaInfo-SampleTable-VisualSampleDesc] SourceImageHeight: 1080
[MOV-Movie-Track-Media-MediaInfo-SampleTable-VisualSampleDesc] XResolution: 72
[MOV-Movie-Track-Media-MediaInfo-SampleTable-VisualSampleDesc] YResolution: 72
[MOV-Movie-Track-Media-MediaInfo-SampleTable-VisualSampleDesc] BitDepth: 24
[MOV-Movie-Track-Media-MediaInfo-SampleTable] VideoFrameRate: 23.976
[MOV-Movie-Track-Media-MediaHeader] MediaHeaderVersion: 0
[MOV-Movie-Track-Media-MediaHeader] MediaCreateDate: 2025:05:08 22:51:26+02:00
[MOV-Movie-Track-Media-MediaHeader] MediaModifyDate: 2025:05:08 22:51:26+02:00
[MOV-Movie-Track-Media-MediaHeader] MediaTimeScale: 24000
[MOV-Movie-Track-Media-MediaHeader] MediaDuration: 15.52 s
[MOV-Movie-Track-Media-Handler] HandlerClass    : Media Handler
[MOV-Movie-Track-Media-Handler] HandlerType     : Audio Track
[MOV-Movie-Track-Media-MediaInfo-AudioHeader] Balance: 0
[MOV-Movie-Track-Media-MediaInfo-SampleTable-AudioSampleDesc] AudioFormat: sowt
[MOV-Movie-UserData-NikonNCDT-NikonTags] Make   : NIKON CORPORATION
[MOV-Movie-UserData-NikonNCDT-NikonTags] Model  : NIKON D3100
[MOV-Movie-UserData-NikonNCDT-NikonTags] Software: NIKON D3100 Ver.1.00
[MOV-Movie-UserData-NikonNCDT-NikonTags] CreateDate: 2025:05:08 20:51:26
[MOV-Movie-UserData-NikonNCDT-NikonTags] DateTimeOriginal: 2025:05:08 20:51:26
[MOV-Movie-UserData-NikonNCDT-NikonTags] FrameCount: 372
[MOV-Movie-UserData-NikonNCDT-NikonTags] FrameRate: 23.976
[MOV-Movie-UserData-NikonNCDT-NikonTags] FrameWidth: 1920
[MOV-Movie-UserData-NikonNCDT-NikonTags] FrameHeight: 1080
[MOV-Movie-UserData-NikonNCDT-NikonTags] AudioChannels: 1
[MOV-Movie-UserData-NikonNCDT-NikonTags] AudioBitsPerSample: 16
[MOV-Movie-UserData-NikonNCDT-NikonTags] AudioSampleRate: 24000
[MOV-Movie-UserData-NikonNCDT-NikonTags] MakerNoteVersion: 2.10
[MOV-Movie-UserData-NikonNCDT-NikonTags] WhiteBalance: AUTO
[MOV-Movie-UserData-NikonNCDT-NikonTags] WhiteBalanceFineTune: 0 0
[MOV-Movie-UserData-NikonNCDT-NikonTags] ColorSpace: sRGB
[MOV-Movie-UserData-NikonNCDT-NikonTags] PictureControlData: (Binary data 58 bytes, use -b option to extract)
[MOV-Movie-UserData-NikonNCDT-NikonTags] LensType: G VR
[MOV-Movie-UserData-NikonNCDT-NikonTags] Lens   : 18-55mm f/3.5-5.6
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] PictureControlVersion: 0100
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] PictureControlName: Standard
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] PictureControlBase: Standard
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] PictureControlAdjust: Default Settings
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] PictureControlQuickAdjust: n/a
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] Sharpness: Auto
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] Contrast: Auto
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] Brightness: Normal
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] Saturation: Auto
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] HueAdjustment: None
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] FilterEffect: n/a
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] ToningEffect: n/a
[MOV-Movie-UserData-NikonNCDT-NikonTags-PictureControlData] ToningSaturation: n/a
[MOV-Movie-UserData-NikonNCDT-NikonTags-WorldTime] TimeZone: -05:00
[MOV-Movie-UserData-NikonNCDT-NikonTags-WorldTime] DaylightSavings: No
[MOV-Movie-UserData-NikonNCDT-NikonTags-WorldTime] DateDisplayFormat: D/M/Y
[MOV-Movie-UserData-NikonNCDT] ThumbnailImage   : (Binary data 9427 bytes, use -b option to extract)
[MOV-Movie-UserData-NikonNCDT] PreviewImage     : (Binary data 248978 bytes, use -b option to extract)
[Composite]     ImageSize                       : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     LensSpec                        : 18-55mm f/3.5-5.6 G VR
[Composite]     AvgBitrate                      : 19.1 Mbps
[Composite]     Rotation                        : 0

The actual timezone of the picture is GMT-06:00 with Daylight Savings Time On. Unfortunately Immich reads the +05:00 MakerNotes:TimeZone and places this movie before the related photos.

I tried setting MakerNotes:TimeZone but ExifTool reports 1 file unchanged. According to the documentation, the MOV dates are stored as UTC internally. But it seems I have no way to set the time zone, and EXIF tags are not applicable to a movie, so how do I realistically fix this?

Thanks for your help!

StarGeek

What is the output of this command (G1, not G5)?
exiftool -time:all -G1 -a -s file.mov

From what I can tell from this post, immich isn't going to read the MakerNotes time stamps.

Unfortunately, MakerNotes in video files aren't usually editable. So if immich is indeed using that, unlike the github post says, then there may not be much you can do about it.

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

l.scorcia

#2
Hi, here is the output of the command you suggested:

[System]        FileModifyDate                  : 2025:05:08 20:51:26+02:00
[System]        FileAccessDate                  : 2025:05:25 02:28:09+02:00
[System]        FileCreateDate                  : 2025:05:19 00:12:32+02:00
[QuickTime]     CreateDate                      : 2025:05:08 20:51:26
[QuickTime]     ModifyDate                      : 2025:05:08 20:51:26
[Track1]        TrackCreateDate                 : 2025:05:08 20:51:26
[Track1]        TrackModifyDate                 : 2025:05:08 20:51:26
[Track1]        MediaCreateDate                 : 2025:05:08 20:51:26
[Track1]        MediaModifyDate                 : 2025:05:08 20:51:26
[Track2]        TrackCreateDate                 : 2025:05:08 20:51:26
[Track2]        TrackModifyDate                 : 2025:05:08 20:51:26
[Track2]        MediaCreateDate                 : 2025:05:08 20:51:26
[Track2]        MediaModifyDate                 : 2025:05:08 20:51:26
[Nikon]         CreateDate                      : 2025:05:08 20:51:26
[Nikon]         DateTimeOriginal                : 2025:05:08 20:51:26
[Nikon]         TimeZone                        : -05:00
[Nikon]         DaylightSavings                 : No
[Nikon]         DateDisplayFormat               : D/M/Y

Immich shows it as 2025:05:08 15:51 GMT-05:00, and it's not the timezone of my computer as that's set to GMT+01:00, so the only explanation I can think is that immich is indeed reading that timezone tag. I'm no TypeScript expert, but as far as I can see Immich source calls them "exif tags", but it's actually the output of the https://github.com/photostructure/exiftool-vendored.js library, which claims to be based on exiftool and it might well be reading that tag.

Phil Harvey

These Nikon tags are part of the Nikon NCTG metadata, and unfortunately not currently writable by ExifTool.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

I also have to point out that the Quicktime and Track# time stamps are incorrect. Those time stamps are the UTC ones and if the time listed by the FileModifyDate is correct, then all of those should be set to 2025:05:08 18:51:26.

You might also try setting the two Quicktime time stamps that are not UTC and can include a time zone, as both of them appear on the list I linked above. Try this with a test file, assuming the FileModifyDate is correct
exiftool -api QuickTimeUTC "-Quicktime:AllDates<FileModifyDate" "-Track*Date<FileModifyDate" "-Media*Date<FileModifyDate" "-Quicktime:CreationDate<FileModifyDate" file.mov
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

l.scorcia

Thanks for all of your replies, they all gave me a piece to solve the puzzle.

1) ExifTool cannot edit those Nikon tags, but it can remove the MakerNotes field, so I did that, stripping the TimeZone attribute that was confusing Immich. All remaining tags are MOV tags which are always UTC.

2) I asked ExifTool to add a DateTimeOriginal tag. This adds a XMP tag that supports time zones and that luckily Immich reads, providing a reference for the time zone. After that I could shift the time to correct any residual offsets.

exiftool.exe -api QuickTimeUTC "-makernotes:all=" "-Quicktime:AllDates-=2" "-Track*Date-=2" "-Media*Date-=2" "-DateTimeOriginal<${QuickTime:CreateDate}-06:00" "DSC_0032.MOV"

exiftool.exe -api QuickTimeUTC "-DateTimeOriginal-=2" "DSC_0032.MOV"

It is probably possible to join those two commands into a single one, but it's simple enough and once again exiftool saves the day! Lesson learned: before the first picture check the camera settings at least twice.

Thanks again for your help!

EDIT: There is still something that I'm not understanding about what happened with those movie dates. Not all time offsets are quite what I would expect. I will try to reason a little more about it tomorrow morning. However it's now more a matter of data and not a technical issue. Thanks again!

EDIT 2: What I think happens here is that my camera writes the QuickTime dates as local and not as UTC as the QT specs require, so the usage of the -api QuickTimeUTC parameter would be incorrect in this scenario.

A more appropriate command pair seems to be:

# 1. Remove the Nikon tags, fix the local time of the pictures (2 hours off due to incorrect time set on camera)
exiftool.exe "-makernotes:all=" "-Quicktime:AllDates-=2" "-Track*Date-=2" "-Media*Date-=2" "DSC_0032.MOV"
# 2. Copy the local date to DateTimeOriginal and specify the real time zone
exiftool.exe "-DateTimeOriginal<${QuickTime:CreateDate}-06:00" "DSC_0032.MOV"