Metadata: Timestamps may be incorrect if non-standard XMP sidecar files are created and uploaded with PhotoSync #1956

Open
opened 2026-02-20 01:03:04 -05:00 by deekerman · 16 comments
Owner

Originally created by @charlieshen7 on GitHub (Nov 19, 2023).

1. What is not working as documented?

i use photosync(ios) to upload my photos ans xmp sidecars, but some photos have wrong time
such as this photo was taken at 2023-10-29 22:49:51, but in photoprism, the time is 2023-10-30 06:49:51

I checked yaml in sidecar, the time is correct

DocumentID: 27104ae1-34d5-4be8-8560-6e00890ae930
TakenAt: 2023-10-29T14:49:51Z
TakenAtLocal: 2023-10-29T22:49:51Z
TakenSrc: meta
UID: ps4dnm01p74ti72p
Type: live
Title: 深圳市 / China / 2023
TimeZone: Asia/Shanghai
PlaceSrc: meta
Altitude: 22
Lat: 22.594456
Lng: 113.88207
Year: 2023
Month: 10
Day: 29
ISO: 500
Exposure: 1/25
FNumber: 1.6
FocalLength: 42
Quality: 4
Duration: 2.03s
Details:
  Keywords: china, grey, 广东省, 深圳市, 西乡大道辅路, 西乡街道
  Subject: 鳌拜
  SubjectSrc: meta
  Software: 17.0.3
  SoftwareSrc: meta
CreatedAt: 2023-11-19T15:42:00Z
UpdatedAt: 2023-11-19T15:42:02Z

and also exif info, time is crrect also

[{
  "SourceFile": "IMG_2598.JPG",
  "ExifTool": {
    "ExifToolVersion": 12.56
  },
  "File": {
    "FileName": "IMG_2598.JPG",
    "Directory": ".",
    "FileSize": 2542267,
    "FileModifyDate": "2023:11:19 23:24:48+08:00",
    "FileAccessDate": "2023:11:19 23:24:48+08:00",
    "FileInodeChangeDate": "2023:11:19 23:24:48+08:00",
    "FilePermissions": 100664,
    "FileType": "JPEG",
    "FileTypeExtension": "JPG",
    "MIMEType": "image/jpeg",
    "ExifByteOrder": "MM",
    "ImageWidth": 4032,
    "ImageHeight": 3024,
    "EncodingProcess": 0,
    "BitsPerSample": 8,
    "ColorComponents": 3,
    "YCbCrSubSampling": "2 2"
  },
  "JFIF": {
    "JFIFVersion": "1 1",
    "ResolutionUnit": 1,
    "XResolution": 300,
    "YResolution": 300
  },
  "EXIF": {
    "Make": "Apple",
    "Model": "iPhone 13",
    "Orientation": 1,
    "XResolution": 72,
    "YResolution": 72,
    "ResolutionUnit": 2,
    "Software": "17.0.3",
    "ModifyDate": "2023:10:29 22:49:51",
    "HostComputer": "iPhone 13",
    "ExposureTime": 0.04,
    "FNumber": 1.6,
    "ExposureProgram": 2,
    "ISO": 500,
    "ExifVersion": "0232",
    "DateTimeOriginal": "2023:10:29 22:49:51",
    "CreateDate": "2023:10:29 22:49:51",
    "OffsetTime": "+08:00",
    "OffsetTimeOriginal": "+08:00",
    "OffsetTimeDigitized": "+08:00",
    "ComponentsConfiguration": "1 2 3 0",
    "ShutterSpeedValue": 0.0400019999951751,
    "ApertureValue": 1.59999999932056,
    "BrightnessValue": -0.8879369197,
    "ExposureCompensation": 0,
    "MeteringMode": 3,
    "Flash": 16,
    "FocalLength": 5.1,
    "SubjectArea": "1232 1537 753 744",
    "SubSecTimeOriginal": 826,
    "SubSecTimeDigitized": 826,
    "FlashpixVersion": "0100",
    "ColorSpace": 65535,
    "ExifImageWidth": 4032,
    "ExifImageHeight": 3024,
    "SensingMethod": 2,
    "SceneType": 1,
    "ExposureMode": 0,
    "WhiteBalance": 0,
    "DigitalZoomRatio": 1.653552645,
    "FocalLengthIn35mmFormat": 42,
    "SceneCaptureType": 0,
    "LensInfo": "1.539999962 5.1 1.6 2.4",
    "LensMake": "Apple",
    "LensModel": "iPhone 13 back dual wide camera 5.1mm f/1.6",
    "CompositeImage": 2,
    "GPSLatitudeRef": "N",
    "GPSLatitude": 22.5944555555556,
    "GPSLongitudeRef": "E",
    "GPSLongitude": 113.882072222222,
    "GPSAltitudeRef": 0,
    "GPSAltitude": 22.27961468,
    "GPSTimeStamp": "14:49:47",
    "GPSSpeedRef": "K",
    "GPSSpeed": 0,
    "GPSImgDirectionRef": "T",
    "GPSImgDirection": 251.1416931,
    "GPSDestBearingRef": "T",
    "GPSDestBearing": 251.1416931,
    "GPSDateStamp": "2023:10:29",
    "GPSHPositioningError": 22.31890612
  },
  "MakerNotes": {
    "MakerNoteVersion": 14,
    "RunTimeFlags": 1,
    "RunTimeValue": 667931071437208,
    "RunTimeScale": 1000000000,
    "RunTimeEpoch": 0,
    "AEStable": 1,
    "AETarget": 170,
    "AEAverage": 169,
    "AFStable": 1,
    "AccelerationVector": "-0.7905974988 0.007388021324 -0.6179519889",
    "FocusDistanceRange": "1.2578125 0.59765625",
    "OISMode": 2,
    "MediaGroupUUID": "27104AE1-34D5-4BE8-8560-6E00890AE930",
    "LivePhotoVideoIndex": 1112547328,
    "HDRHeadroom": 0.8432090282,
    "SignalToNoiseRatio": 28.2517128,
    "FocusPosition": 68,
    "HDRGain": 0,
    "SemanticStyle": "{0=1,1=0,2=0,3=0}",
    "FrontFacingCamera": 0
  },
  "XMP": {
    "XMPToolkit": "XMP Core 6.0.0",
    "CompositeImage": 2,
    "WhiteBalance": 0,
    "ExposureMode": 0,
    "ExifImageHeight": 3024,
    "GPSLatitude": 22.594455,
    "GPSLongitude": 113.882071666667,
    "ColorSpace": 65535,
    "GPSDateTime": "2023:10:29 14:49:47+0000",
    "GPSImgDirection": 251.141693073789,
    "GPSDestBearingRef": "T",
    "ApertureValue": 1.5999999994623,
    "GPSAltitudeRef": 0,
    "FlashPixVersion": "0100",
    "SubsecTimeOriginal": 826,
    "GPSImgDirectionRef": "T",
    "ExposureTime": 0.04,
    "BrightnessValue": -0.887936919716002,
    "FocalLength": 5.1,
    "GPSDestBearing": 251.141693073789,
    "OffsetTime": "+08:00",
    "DigitalZoomRatio": 1.65355264514798,
    "ShutterSpeedValue": 0.0400019999930833,
    "SubsecTimeDigitized": 826,
    "SceneCaptureType": 0,
    "ExposureProgram": 2,
    "FNumber": 1.6,
    "GPSSpeed": 0,
    "OffsetTimeDigitized": "+08:00",
    "SensingMethod": 2,
    "MeteringMode": 3,
    "GPSAltitude": 22.2796146836761,
    "SceneType": 1,
    "OffsetTimeOriginal": "+08:00",
    "GPSHPositioningError": 22.3189061154177,
    "GPSSpeedRef": "K",
    "ExposureCompensation": 0,
    "ExifImageWidth": 4032,
    "FocalLenIn35mmFilm": 42,
    "ExifVersion": "0232",
    "ModifyDate": "2023:10:29 22:49:51",
    "CreateDate": "2023:10:29 22:49:51.826",
    "CreatorTool": "17.0.3",
    "Orientation": 1,
    "XResolution": 72,
    "HostComputer": "iPhone 13",
    "ResolutionUnit": 2,
    "YResolution": 72,
    "Make": "Apple",
    "Tag_YCbCrPositioning": 1,
    "Model": "iPhone 13",
    "PhotographicSensitivity": 500,
    "LensMake": "Apple",
    "LensModel": "iPhone 13 back dual wide camera 5.1mm f/1.6",
    "DateCreated": "2023:10:29 22:49:51.826",
    "ISO": 500,
    "ComponentsConfiguration": [1,2,3,0],
    "SubjectArea": [1232,1537,753,744],
    "FlashFunction": false,
    "FlashFired": false,
    "FlashReturn": 0,
    "FlashMode": 2,
    "FlashRedEyeMode": false,
    "LensInfo": "1.53999996185121 5.1 1.6 2.4",
    "Subject": "鳌拜"
  },
  "MPF": {
    "MPFVersion": "0100",
    "NumberOfImages": 2,
    "MPImageFlags": 0,
    "MPImageFormat": 0,
    "MPImageType": 0,
    "MPImageLength": 214152,
    "MPImageStart": 2328115,
    "DependentImage1EntryNumber": 0,
    "DependentImage2EntryNumber": 0,
    "MPImage2": "(Binary data 214152 bytes, use -b option to extract)"
  },
  "ICC_Profile": {
    "ProfileCMMType": "appl",
    "ProfileVersion": 1024,
    "ProfileClass": "mntr",
    "ColorSpaceData": "RGB ",
    "ProfileConnectionSpace": "XYZ ",
    "ProfileDateTime": "2022:01:01 00:00:00",
    "ProfileFileSignature": "acsp",
    "PrimaryPlatform": "APPL",
    "CMMFlags": 0,
    "DeviceManufacturer": "APPL",
    "DeviceModel": "",
    "DeviceAttributes": "0 0",
    "RenderingIntent": 0,
    "ConnectionSpaceIlluminant": "0.9642 1 0.82491",
    "ProfileCreator": "appl",
    "ProfileID": "236 253 163 142 56 133 71 195 109 180 189 79 122 218 24 47",
    "ProfileDescription": "Display P3",
    "ProfileCopyright": "Copyright Apple Inc., 2022",
    "MediaWhitePoint": "0.96419 1 0.82489",
    "RedMatrixColumn": "0.51512 0.2412 -0.00105",
    "GreenMatrixColumn": "0.29198 0.69225 0.04189",
    "BlueMatrixColumn": "0.1571 0.06657 0.78407",
    "RedTRC": "(Binary data 32 bytes, use -b option to extract)",
    "ChromaticAdaptation": "1.04788 0.02292 -0.0502 0.02959 0.99048 -0.01706 -0.00923 0.01508 0.75168",
    "BlueTRC": "(Binary data 32 bytes, use -b option to extract)",
    "GreenTRC": "(Binary data 32 bytes, use -b option to extract)"
  },
  "Composite": {
    "RunTimeSincePowerUp": 667931.071437208,
    "Aperture": 1.6,
    "ImageSize": "4032 3024",
    "Megapixels": 12.192768,
    "ScaleFactor35efl": 8.23529411764706,
    "ShutterSpeed": 0.04,
    "SubSecCreateDate": "2023:10:29 22:49:51.826+08:00",
    "SubSecDateTimeOriginal": "2023:10:29 22:49:51.826+08:00",
    "SubSecModifyDate": "2023:10:29 22:49:51+08:00",
    "GPSAltitude": 22.27961468,
    "GPSDateTime": "2023:10:29 14:49:47Z",
    "GPSLatitude": 22.5944555555556,
    "GPSLongitude": 113.882072222222,
    "Flash": 16,
    "GPSLatitudeRef": "N",
    "GPSLongitudeRef": "E",
    "CircleOfConfusion": 0.0036484745049338,
    "FOV": 46.3972202173517,
    "FocalLength35efl": 42,
    "GPSPosition": "22.5944555555556 113.882072222222",
    "HyperfocalDistance": 4.45562932617915,
    "LightValue": 3.67807190511264,
    "LensID": "iPhone 13 back dual wide camera 5.1mm f/1.6"
  }
}]

if i choose not send xmp sidecar in photosync, the time will be shown correct in photoprism. but some photos which were download in apps will lose time info, so i have to choose upload xmp sidecar

i check xmp file, it seems nothing wrong. so i don't think it's photosync(ios)'s bug

2. How can we reproduce it?

Steps to reproduce the behavior:

  1. upload wrong time photo with xmp sidecar to photoprism
    wrong time photo with xmp file.zip

  2. check the time of the photo

also here is another photo with xmp sidecar, but it can show right time
correct time photo with xmp file.zip

3. What behavior do you expect?

the time of photo can be recognized correctly

4. What could be the cause of your problem?

i cheked the sidecar yaml and exif info of the photo in photoprism, seems nothing wrong
maybe the xmp file caused time offset twice?
in ymal the takenat is 2023-10-29T14:49:51, takenatlocal is 2023-10-29T22:49:51
but if calucale +8 again with takenatlocal, the time becomes the wrong time 2023-10-30 06:49:51

5. Can you provide us with example files for testing, error logs, or screenshots?

6. Which software versions do you use?

(a) PhotoPrism Architecture & Build Number: AMD64, 231021-9abea5b55

(b) Database Type & Version: MariaDB 10.11

(c) Operating System Types & Versions: Linux

(d) Browser Types & Versions: Firefox, Chrome

(e) Ad Blockers, Browser Plugins, and/or Firewall Software? NO

Originally created by @charlieshen7 on GitHub (Nov 19, 2023). #### 1. What is not working as documented? i use photosync(ios) to upload my photos ans xmp sidecars, but some photos have wrong time such as this photo was taken at 2023-10-29 22:49:51, but in photoprism, the time is 2023-10-30 06:49:51 I checked yaml in sidecar, the time is correct ```yaml DocumentID: 27104ae1-34d5-4be8-8560-6e00890ae930 TakenAt: 2023-10-29T14:49:51Z TakenAtLocal: 2023-10-29T22:49:51Z TakenSrc: meta UID: ps4dnm01p74ti72p Type: live Title: 深圳市 / China / 2023 TimeZone: Asia/Shanghai PlaceSrc: meta Altitude: 22 Lat: 22.594456 Lng: 113.88207 Year: 2023 Month: 10 Day: 29 ISO: 500 Exposure: 1/25 FNumber: 1.6 FocalLength: 42 Quality: 4 Duration: 2.03s Details: Keywords: china, grey, 广东省, 深圳市, 西乡大道辅路, 西乡街道 Subject: 鳌拜 SubjectSrc: meta Software: 17.0.3 SoftwareSrc: meta CreatedAt: 2023-11-19T15:42:00Z UpdatedAt: 2023-11-19T15:42:02Z ``` and also exif info, time is crrect also ```json [{ "SourceFile": "IMG_2598.JPG", "ExifTool": { "ExifToolVersion": 12.56 }, "File": { "FileName": "IMG_2598.JPG", "Directory": ".", "FileSize": 2542267, "FileModifyDate": "2023:11:19 23:24:48+08:00", "FileAccessDate": "2023:11:19 23:24:48+08:00", "FileInodeChangeDate": "2023:11:19 23:24:48+08:00", "FilePermissions": 100664, "FileType": "JPEG", "FileTypeExtension": "JPG", "MIMEType": "image/jpeg", "ExifByteOrder": "MM", "ImageWidth": 4032, "ImageHeight": 3024, "EncodingProcess": 0, "BitsPerSample": 8, "ColorComponents": 3, "YCbCrSubSampling": "2 2" }, "JFIF": { "JFIFVersion": "1 1", "ResolutionUnit": 1, "XResolution": 300, "YResolution": 300 }, "EXIF": { "Make": "Apple", "Model": "iPhone 13", "Orientation": 1, "XResolution": 72, "YResolution": 72, "ResolutionUnit": 2, "Software": "17.0.3", "ModifyDate": "2023:10:29 22:49:51", "HostComputer": "iPhone 13", "ExposureTime": 0.04, "FNumber": 1.6, "ExposureProgram": 2, "ISO": 500, "ExifVersion": "0232", "DateTimeOriginal": "2023:10:29 22:49:51", "CreateDate": "2023:10:29 22:49:51", "OffsetTime": "+08:00", "OffsetTimeOriginal": "+08:00", "OffsetTimeDigitized": "+08:00", "ComponentsConfiguration": "1 2 3 0", "ShutterSpeedValue": 0.0400019999951751, "ApertureValue": 1.59999999932056, "BrightnessValue": -0.8879369197, "ExposureCompensation": 0, "MeteringMode": 3, "Flash": 16, "FocalLength": 5.1, "SubjectArea": "1232 1537 753 744", "SubSecTimeOriginal": 826, "SubSecTimeDigitized": 826, "FlashpixVersion": "0100", "ColorSpace": 65535, "ExifImageWidth": 4032, "ExifImageHeight": 3024, "SensingMethod": 2, "SceneType": 1, "ExposureMode": 0, "WhiteBalance": 0, "DigitalZoomRatio": 1.653552645, "FocalLengthIn35mmFormat": 42, "SceneCaptureType": 0, "LensInfo": "1.539999962 5.1 1.6 2.4", "LensMake": "Apple", "LensModel": "iPhone 13 back dual wide camera 5.1mm f/1.6", "CompositeImage": 2, "GPSLatitudeRef": "N", "GPSLatitude": 22.5944555555556, "GPSLongitudeRef": "E", "GPSLongitude": 113.882072222222, "GPSAltitudeRef": 0, "GPSAltitude": 22.27961468, "GPSTimeStamp": "14:49:47", "GPSSpeedRef": "K", "GPSSpeed": 0, "GPSImgDirectionRef": "T", "GPSImgDirection": 251.1416931, "GPSDestBearingRef": "T", "GPSDestBearing": 251.1416931, "GPSDateStamp": "2023:10:29", "GPSHPositioningError": 22.31890612 }, "MakerNotes": { "MakerNoteVersion": 14, "RunTimeFlags": 1, "RunTimeValue": 667931071437208, "RunTimeScale": 1000000000, "RunTimeEpoch": 0, "AEStable": 1, "AETarget": 170, "AEAverage": 169, "AFStable": 1, "AccelerationVector": "-0.7905974988 0.007388021324 -0.6179519889", "FocusDistanceRange": "1.2578125 0.59765625", "OISMode": 2, "MediaGroupUUID": "27104AE1-34D5-4BE8-8560-6E00890AE930", "LivePhotoVideoIndex": 1112547328, "HDRHeadroom": 0.8432090282, "SignalToNoiseRatio": 28.2517128, "FocusPosition": 68, "HDRGain": 0, "SemanticStyle": "{0=1,1=0,2=0,3=0}", "FrontFacingCamera": 0 }, "XMP": { "XMPToolkit": "XMP Core 6.0.0", "CompositeImage": 2, "WhiteBalance": 0, "ExposureMode": 0, "ExifImageHeight": 3024, "GPSLatitude": 22.594455, "GPSLongitude": 113.882071666667, "ColorSpace": 65535, "GPSDateTime": "2023:10:29 14:49:47+0000", "GPSImgDirection": 251.141693073789, "GPSDestBearingRef": "T", "ApertureValue": 1.5999999994623, "GPSAltitudeRef": 0, "FlashPixVersion": "0100", "SubsecTimeOriginal": 826, "GPSImgDirectionRef": "T", "ExposureTime": 0.04, "BrightnessValue": -0.887936919716002, "FocalLength": 5.1, "GPSDestBearing": 251.141693073789, "OffsetTime": "+08:00", "DigitalZoomRatio": 1.65355264514798, "ShutterSpeedValue": 0.0400019999930833, "SubsecTimeDigitized": 826, "SceneCaptureType": 0, "ExposureProgram": 2, "FNumber": 1.6, "GPSSpeed": 0, "OffsetTimeDigitized": "+08:00", "SensingMethod": 2, "MeteringMode": 3, "GPSAltitude": 22.2796146836761, "SceneType": 1, "OffsetTimeOriginal": "+08:00", "GPSHPositioningError": 22.3189061154177, "GPSSpeedRef": "K", "ExposureCompensation": 0, "ExifImageWidth": 4032, "FocalLenIn35mmFilm": 42, "ExifVersion": "0232", "ModifyDate": "2023:10:29 22:49:51", "CreateDate": "2023:10:29 22:49:51.826", "CreatorTool": "17.0.3", "Orientation": 1, "XResolution": 72, "HostComputer": "iPhone 13", "ResolutionUnit": 2, "YResolution": 72, "Make": "Apple", "Tag_YCbCrPositioning": 1, "Model": "iPhone 13", "PhotographicSensitivity": 500, "LensMake": "Apple", "LensModel": "iPhone 13 back dual wide camera 5.1mm f/1.6", "DateCreated": "2023:10:29 22:49:51.826", "ISO": 500, "ComponentsConfiguration": [1,2,3,0], "SubjectArea": [1232,1537,753,744], "FlashFunction": false, "FlashFired": false, "FlashReturn": 0, "FlashMode": 2, "FlashRedEyeMode": false, "LensInfo": "1.53999996185121 5.1 1.6 2.4", "Subject": "鳌拜" }, "MPF": { "MPFVersion": "0100", "NumberOfImages": 2, "MPImageFlags": 0, "MPImageFormat": 0, "MPImageType": 0, "MPImageLength": 214152, "MPImageStart": 2328115, "DependentImage1EntryNumber": 0, "DependentImage2EntryNumber": 0, "MPImage2": "(Binary data 214152 bytes, use -b option to extract)" }, "ICC_Profile": { "ProfileCMMType": "appl", "ProfileVersion": 1024, "ProfileClass": "mntr", "ColorSpaceData": "RGB ", "ProfileConnectionSpace": "XYZ ", "ProfileDateTime": "2022:01:01 00:00:00", "ProfileFileSignature": "acsp", "PrimaryPlatform": "APPL", "CMMFlags": 0, "DeviceManufacturer": "APPL", "DeviceModel": "", "DeviceAttributes": "0 0", "RenderingIntent": 0, "ConnectionSpaceIlluminant": "0.9642 1 0.82491", "ProfileCreator": "appl", "ProfileID": "236 253 163 142 56 133 71 195 109 180 189 79 122 218 24 47", "ProfileDescription": "Display P3", "ProfileCopyright": "Copyright Apple Inc., 2022", "MediaWhitePoint": "0.96419 1 0.82489", "RedMatrixColumn": "0.51512 0.2412 -0.00105", "GreenMatrixColumn": "0.29198 0.69225 0.04189", "BlueMatrixColumn": "0.1571 0.06657 0.78407", "RedTRC": "(Binary data 32 bytes, use -b option to extract)", "ChromaticAdaptation": "1.04788 0.02292 -0.0502 0.02959 0.99048 -0.01706 -0.00923 0.01508 0.75168", "BlueTRC": "(Binary data 32 bytes, use -b option to extract)", "GreenTRC": "(Binary data 32 bytes, use -b option to extract)" }, "Composite": { "RunTimeSincePowerUp": 667931.071437208, "Aperture": 1.6, "ImageSize": "4032 3024", "Megapixels": 12.192768, "ScaleFactor35efl": 8.23529411764706, "ShutterSpeed": 0.04, "SubSecCreateDate": "2023:10:29 22:49:51.826+08:00", "SubSecDateTimeOriginal": "2023:10:29 22:49:51.826+08:00", "SubSecModifyDate": "2023:10:29 22:49:51+08:00", "GPSAltitude": 22.27961468, "GPSDateTime": "2023:10:29 14:49:47Z", "GPSLatitude": 22.5944555555556, "GPSLongitude": 113.882072222222, "Flash": 16, "GPSLatitudeRef": "N", "GPSLongitudeRef": "E", "CircleOfConfusion": 0.0036484745049338, "FOV": 46.3972202173517, "FocalLength35efl": 42, "GPSPosition": "22.5944555555556 113.882072222222", "HyperfocalDistance": 4.45562932617915, "LightValue": 3.67807190511264, "LensID": "iPhone 13 back dual wide camera 5.1mm f/1.6" } }] ``` if i choose not send xmp sidecar in photosync, the time will be shown correct in photoprism. but some photos which were download in apps will lose time info, so i have to choose upload xmp sidecar i check xmp file, it seems nothing wrong. so i don't think it's photosync(ios)'s bug #### 2. How can we reproduce it? Steps to reproduce the behavior: 1. upload wrong time photo with xmp sidecar to photoprism [wrong time photo with xmp file.zip](https://github.com/photoprism/photoprism/files/13403990/wrong.time.photo.with.xmp.file.zip) 2. check the time of the photo also here is another photo with xmp sidecar, but it can show right time [correct time photo with xmp file.zip](https://github.com/photoprism/photoprism/files/13404002/correct.time.photo.with.xmp.file.zip) #### 3. What behavior do you expect? the time of photo can be recognized correctly #### 4. What could be the cause of your problem? i cheked the sidecar yaml and exif info of the photo in photoprism, seems nothing wrong maybe the xmp file caused time offset twice? in ymal the takenat is 2023-10-29T14:49:51, takenatlocal is 2023-10-29T22:49:51 but if calucale +8 again with takenatlocal, the time becomes the wrong time 2023-10-30 06:49:51 #### 5. Can you provide us with example files for testing, error logs, or screenshots? #### 6. Which software versions do you use? (a) PhotoPrism Architecture & Build Number: AMD64, 231021-9abea5b55 (b) Database Type & Version: MariaDB 10.11 (c) Operating System Types & Versions: Linux (d) Browser Types & Versions: Firefox, Chrome (e) Ad Blockers, Browser Plugins, and/or Firewall Software? NO
Author
Owner

@lastzero commented on GitHub (Nov 19, 2023):

Sorry, just a quick reply since it's Sunday night. I suspect that part of the problem might be the added offset and the fact that DateCreated is normally in UTC when the field itself does not specify a different timezone:

"OffsetTimeOriginal": "+08:00",
"DateCreated": "2023:10:29 22:49:51.826",

Combined with this feature request we recently implemented, it could lead to the observed behavior:

Please also clarify whether you are referring to an XMP sidecar file or embedded XMP information. If you are using both, please explain the use case for our understanding. This could clearly make things more complex as you then have multiple timestamps in different sources such as Exif, embedded XMP and an XMP sidecar file.

@lastzero commented on GitHub (Nov 19, 2023): Sorry, just a quick reply since it's Sunday night. I suspect that part of the problem might be the added offset and the fact that `DateCreated` is normally in UTC when the field itself does not specify a different timezone: ``` "OffsetTimeOriginal": "+08:00", "DateCreated": "2023:10:29 22:49:51.826", ``` Combined with this feature request we recently implemented, it could lead to the observed behavior: - #2876 Please also clarify whether you are referring to an XMP sidecar file or embedded XMP information. If you are using both, please explain the use case for our understanding. This could clearly make things more complex as you then have multiple timestamps in different sources such as Exif, embedded XMP and an XMP sidecar file.
Author
Owner

@lastzero commented on GitHub (Nov 19, 2023):

It would be great if you could also attach a screenshot of the PhotoSync settings. Note that it can also submit some information to PhotoPrism via HTTP header (in addition to the embedded metadata).

@lastzero commented on GitHub (Nov 19, 2023): It would be great if you could also attach a screenshot of the PhotoSync settings. Note that it can also submit some information to PhotoPrism via HTTP header (in addition to the embedded metadata).
Author
Owner

@charlieshen7 commented on GitHub (Nov 19, 2023):

Please also clarify whether you are referring to an XMP sidecar file or embedded XMP information. If you are using both, please explain the use case for our understanding. This could clearly make things more complex as you then have multiple timestamps in different sources such as Exif, embedded XMP and an XMP sidecar file.

I mean XMP sidecar file, i think some photo has embedded XMP information, you can use the zip file i uploaded when you have free time

It would be great if you could also attach a screenshot of the PhotoSync settings. Note that it can also submit some information to PhotoPrism via HTTP header (in addition to the embedded metadata).

here are my photosync settins (about xmp sidecar settings)
I choosed always in "Transfer XMP Sidecar File" beacuse some photos download in other app like wechat, need xmp sidecar file to recognize the correct time

7d2b264cc869b55b5bc3007b0ea7080
af8ddb5452ca2ec660b17cd70ec9a36
bc025decf67778af2e8cc4a6f86663d

@charlieshen7 commented on GitHub (Nov 19, 2023): > Please also clarify whether you are referring to an XMP sidecar file or embedded XMP information. If you are using both, please explain the use case for our understanding. This could clearly make things more complex as you then have multiple timestamps in different sources such as Exif, embedded XMP and an XMP sidecar file. I mean XMP sidecar file, i think some photo has embedded XMP information, you can use the zip file i uploaded when you have free time > It would be great if you could also attach a screenshot of the PhotoSync settings. Note that it can also submit some information to PhotoPrism via HTTP header (in addition to the embedded metadata). here are my photosync settins (about xmp sidecar settings) I choosed always in "Transfer XMP Sidecar File" beacuse some photos download in other app like wechat, need xmp sidecar file to recognize the correct time ![7d2b264cc869b55b5bc3007b0ea7080](https://github.com/photoprism/photoprism/assets/31721151/e824e279-1e45-4fcc-9703-24930f1f8911) ![af8ddb5452ca2ec660b17cd70ec9a36](https://github.com/photoprism/photoprism/assets/31721151/c2a77e9b-5c24-46b4-b6f9-a9f771476b33) ![bc025decf67778af2e8cc4a6f86663d](https://github.com/photoprism/photoprism/assets/31721151/64ff9297-43f2-439a-b889-fe150e4a2806)
Author
Owner

@lastzero commented on GitHub (Nov 19, 2023):

Does it work when you disable the XMP sidecar file? From all I know, it's not needed for transferring photos to our software and only makes indexing more complicated and slower (plus it can lead to weird behevior as we don't test with these non-standard PhotoSync settings).

@lastzero commented on GitHub (Nov 19, 2023): Does it work when you disable the XMP sidecar file? From all I know, it's not needed for transferring photos to our software and only makes indexing more complicated and slower (plus it can lead to weird behevior as we don't test with these non-standard PhotoSync settings).
Author
Owner

@lastzero commented on GitHub (Nov 19, 2023):

Based on our documentation, there is initial support for "DateCreated" in XMP, but not for "OffsetTime" if it's a separate field (so if you have the timezone/offset from some metadata source in combination with an XMP timestamp that doesn't have a timezone, I would suspect side effects similar to those you've observed):

@lastzero commented on GitHub (Nov 19, 2023): Based on our documentation, there is initial support for "DateCreated" in XMP, but not for "OffsetTime" if it's a separate field (so if you have the timezone/offset from some metadata source in combination with an XMP timestamp that doesn't have a timezone, I would suspect side effects similar to those you've observed): - https://www.photoprism.app/kb/metadata
Author
Owner

@lastzero commented on GitHub (Nov 19, 2023):

Looking at the XMP file, it looks as if 2023-10-29T22:49:51 is interpreted as UTC time and then 8 ours are added which gets us to 2023-10-30 06:49:51 local time.

Note that the XMP specification requires a timezone to be specified with a timestamp, however, it is missing in the sample file you provided:

Screenshot 2023-11-19 at 20 25 16

Compare this with what's found in the XMP file:

<xmp:CreateDate>2023-10-29T22:49:51</xmp:CreateDate>
<photoshop:DateCreated>2023-10-29T22:49:51</photoshop:DateCreated>
@lastzero commented on GitHub (Nov 19, 2023): Looking at the XMP file, it looks as if `2023-10-29T22:49:51` is interpreted as UTC time and then 8 ours are added which gets us to `2023-10-30 06:49:51` local time. Note that the XMP specification requires a timezone to be specified with a timestamp, however, it is missing in the sample file you provided: ![Screenshot 2023-11-19 at 20 25 16](https://github.com/photoprism/photoprism/assets/301686/3fb6e433-5d79-4893-abc7-a3fef4fff7bd) Compare this with what's found in the XMP file: ```XML <xmp:CreateDate>2023-10-29T22:49:51</xmp:CreateDate> <photoshop:DateCreated>2023-10-29T22:49:51</photoshop:DateCreated> ```
Author
Owner

@lastzero commented on GitHub (Nov 19, 2023):

Based on this, a solution could be to ignore such incorrect XMP timestamps completely. However, some users might also report this as a bug because they want it to be used, e.g. if no other information can be extracted directly from a media file.

@lastzero commented on GitHub (Nov 19, 2023): Based on this, a solution could be to ignore such incorrect XMP timestamps completely. However, some users might also report this as a bug because they want it to be used, e.g. if no other information can be extracted directly from a media file.
Author
Owner

@charlieshen7 commented on GitHub (Nov 19, 2023):

Does it work when you disable the XMP sidecar file? From all I know, it's not needed for transferring photos to our software and only makes indexing more complicated and slower (plus it can lead to weird behevior as we don't test with these non-standard

If I disable this setting, the wrong timestamp photo will become have a correct time
However some other photo's timestamp will go wrong 😢 (as what you say, some photo without information need this xmp timestamp)

such as this photo with xmp sidecar file: correct time photo with xmp file.zip

this photo seems has no embeded xpm infomation, so it needs xpm file for the correct time, and in this xmp sidecar file, it has not timeoffset info, which make timestamp shown correctly

are there any solution to make these two kinds photo with xmp sidecar file have correct timestamp both? (such as i can choose whether i need to adjust the time zone when importing, it will lose correct timezone info, but can show correct time at same time)
my ultimate demand just want the photos upload from my iphone are in the same order as in Apple Photos

@charlieshen7 commented on GitHub (Nov 19, 2023): > Does it work when you disable the XMP sidecar file? From all I know, it's not needed for transferring photos to our software and only makes indexing more complicated and slower (plus it can lead to weird behevior as we don't test with these non-standard If I disable this setting, the wrong timestamp photo will become have a correct time However some other photo's timestamp will go wrong 😢 (as what you say, some photo without information need this xmp timestamp) such as this photo with xmp sidecar file: [correct time photo with xmp file.zip](https://github.com/photoprism/photoprism/files/13404002/correct.time.photo.with.xmp.file.zip) this photo seems has no embeded xpm infomation, so it needs xpm file for the correct time, and in this xmp sidecar file, it has not timeoffset info, which make timestamp shown correctly are there any solution to make these two kinds photo with xmp sidecar file have correct timestamp both? (such as i can choose whether i need to adjust the time zone when importing, it will lose correct timezone info, but can show correct time at same time) my ultimate demand just want the photos upload from my iphone are in the same order as in Apple Photos
Author
Owner

@lastzero commented on GitHub (Nov 20, 2023):

I'm wondering what kind of photos created by an iPhone won't already have time information embedded? Note you can additionally choose to transfer photos with the date as filename, which is what I would recommend anyway instead of the original name like IMG_1234.JPG which isn't of any use to other applications and/or humans looking at it.

IMG_0495

@lastzero commented on GitHub (Nov 20, 2023): I'm wondering what kind of photos created by an iPhone won't already have time information embedded? Note you can additionally choose to transfer photos with the date as filename, which is what I would recommend anyway instead of the original name like IMG_1234.JPG which isn't of any use to other applications and/or humans looking at it. ![IMG_0495](https://github.com/photoprism/photoprism/assets/301686/618b0a46-96fd-44d5-9957-9d6178ce80a6)
Author
Owner

@charlieshen7 commented on GitHub (Nov 20, 2023):

I'm wondering what kind of photos created by an iPhone won't already have time information embedded? Note you can additionally choose to transfer photos with the date as filename, which is what I would recommend anyway instead of the original name like IMG_1234.JPG which isn't of any use to other applications and/or humans looking at it.

IMG_0495

will file name change photo's timestamp in photoprism?

@charlieshen7 commented on GitHub (Nov 20, 2023): > I'm wondering what kind of photos created by an iPhone won't already have time information embedded? Note you can additionally choose to transfer photos with the date as filename, which is what I would recommend anyway instead of the original name like IMG_1234.JPG which isn't of any use to other applications and/or humans looking at it. > > ![IMG_0495](https://user-images.githubusercontent.com/301686/284139996-618b0a46-96fd-44d5-9957-9d6178ce80a6.jpeg) will file name change photo's timestamp in photoprism?
Author
Owner

@lastzero commented on GitHub (Nov 20, 2023):

will file name change photo's timestamp in photoprism?

The filename can be used by PhotoPrism as a fallback if no other time information is available. Note, however, that I have not actively tested this particular functionality with that filename pattern yet. If changes are required, they can be quickly implemented from our side. Of course, time zone information or GPS coordinates cannot be extracted from filenames, so it's really just a fallback mechanism, e.g. for messengers like WhatsApp that don't add metadata to received images.

@lastzero commented on GitHub (Nov 20, 2023): > will file name change photo's timestamp in photoprism? The filename can be used by PhotoPrism as a fallback if no other time information is available. Note, however, that I have not actively tested this particular functionality with that filename pattern yet. If changes are required, they can be quickly implemented from our side. Of course, time zone information or GPS coordinates cannot be extracted from filenames, so it's really just a fallback mechanism, e.g. for messengers like WhatsApp that don't add metadata to received images.
Author
Owner

@charlieshen7 commented on GitHub (Nov 21, 2023):

I suspect that the information was lost when uploading the file.
I tried the other photo backup software such as immich, and most of the photos can recognize the timestamp normally.
Later I will try to use syncthing to synchronize photos directly (this can completely retain the file information and see if the timestamp of the photo can be displayed normally)

@charlieshen7 commented on GitHub (Nov 21, 2023): I suspect that the information was lost when uploading the file. I tried the other photo backup software such as immich, and most of the photos can recognize the timestamp normally. Later I will try to use syncthing to synchronize photos directly (this can completely retain the file information and see if the timestamp of the photo can be displayed normally)
Author
Owner

@graciousgrey commented on GitHub (Nov 21, 2023):

A new version of PhotoSync was recently released. The changelog includes "support for iOS 17".

https://www.photosync-app.com/support/release-notes/photosync-4-8-for-ios-released

Have you tested with this new version?

@graciousgrey commented on GitHub (Nov 21, 2023): A new version of PhotoSync was recently released. The changelog includes "support for iOS 17". https://www.photosync-app.com/support/release-notes/photosync-4-8-for-ios-released Have you tested with this new version?
Author
Owner

@graciousgrey commented on GitHub (Nov 21, 2023):

I took a closer look at your files. As lastzero said, both have an XMP date without specifying the time zone.

PhotoPrism now assumes that the specified time is UTC.

The difference between your two images is that one contains GPS coordinates. PhotoPrism uses the coordinates to set a time zone and then calculates the local time from the time specified in the xmp file.

This results in photos with coordinates having "incorrect" times and photos without coordinates appearing to have "correct" times. If you would add coordinates (e.g. in the PhotoPrism user interface) to the files that now appear to have the correct date, the local time would also be updated.

To solve this problem, PhotoSync would need to add the time zone information to the xmp files.

     <photoshop:DateCreated>2023-10-29T22:49:51</photoshop:DateCreated>

If I disable this setting, the wrong timestamp photo will become have a correct time
However some other photo's timestamp will go wrong 😢 (as what you say, some photo without information need this xmp timestamp).

Have you tried using PhotoSync with xmp files disabled and the "Embed adjusted date" option enabled? Do you know where the files without date come from? Is it a file that someone sent you via Messenger? How did you add the missing dates so that PhotoSync could add them to the xmp file?

@graciousgrey commented on GitHub (Nov 21, 2023): I took a closer look at your files. As lastzero said, both have an XMP date without specifying the time zone. PhotoPrism now assumes that the specified time is UTC. The difference between your two images is that one contains GPS coordinates. PhotoPrism uses the coordinates to set a time zone and then calculates the local time from the time specified in the xmp file. This results in photos with coordinates having "incorrect" times and photos without coordinates appearing to have "correct" times. If you would add coordinates (e.g. in the PhotoPrism user interface) to the files that now appear to have the correct date, the local time would also be updated. To solve this problem, PhotoSync would need to add the time zone information to the xmp files. <photoshop:DateCreated>2023-10-29T22:49:51</photoshop:DateCreated> >If I disable this setting, the wrong timestamp photo will become have a correct time However some other photo's timestamp will go wrong 😢 (as what you say, some photo without information need this xmp timestamp). Have you tried using PhotoSync with xmp files disabled and the "Embed adjusted date" option enabled? Do you know where the files without date come from? Is it a file that someone sent you via Messenger? How did you add the missing dates so that PhotoSync could add them to the xmp file?
Author
Owner

@Ghu-svg commented on GitHub (Sep 8, 2024):

@Ghu-svg commented on GitHub (Sep 8, 2024): #
Author
Owner

@Ghu-svg commented on GitHub (Sep 8, 2024):

image

What does this offset time mean my time zone is central photo was taken at 6:30 pm offset -0500

@Ghu-svg commented on GitHub (Sep 8, 2024): ![image](https://github.com/user-attachments/assets/7ef2f8f8-f26b-46df-a493-3f8b31dcbdb1) What does this offset time mean my time zone is central photo was taken at 6:30 pm offset -0500
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#1956
No description provided.