Skip to content

Conversation

@curtgrimes
Copy link

@curtgrimes curtgrimes commented Nov 16, 2025

When a photo in Google Photos with a date of "March 5, 2021 2:35 PM -06:00" is run through this tool and imported into Apple Photos, Apple Photos displays an incorrect date:

In Google Photos After Apple Photos import (time doesn't match)
Screenshot-Photo - Google Photos -2025-11-15-20-36-22 Screenshot-Imports-2025-11-15-20-36-34

This adds an option that allows the photo to be imported into Apple Photos with a time that matches the time recorded in Google Photos:

After Apple Photos import (using new option - time is correct)
Screenshot-Imports-2025-11-15-20-45-25

Details

Add an option to export files with a DateTimeOriginal in UTC (default, current behavior) or optionally in the system's local time zone. This provides a workaround for an issue where files processed by this tool and imported into Apple Photos may have incorrect dates/times due to Apple Photos always assuming the DateTimeOriginal value (which does not include an offset) is in the system's time zone. If the user knows they will be importing their media into Apple Photos after processing it with MetaSort, they can choose a new option to export files with a DateTimeOriginal in the system's time zone instead of UTC.

A prompt and explanation of UTC vs. system time zone export is displayed to the user. The default is the current behavior of exporting in UTC.

❓ Should timestamps be written in UTC (default) or using your current system time zone offset (-06:00)?

Timestamps get written to the DateTimeOriginal EXIF field. By design, this field does not
contain a time zone offset, only a date and time in the fixed YYYY:MM:DD HH:MM:SS format
(but other fields may contain an offset). Some apps like Apple Photos ignore the offset field
and interpret DateTimeOriginal in the local system's time zone offset. So if a photo
originally taken at "2024-05-05 15:00-05:00" is imported into Apple Photos with
a DateTimeOriginal converted to UTC "2024-05-05 20:00" (notice no time zone offset) on a
system set to a time zone offset of "-05:00", the Apple Photos interface will show that
the photo was taken at "2024-05-05 20:00-05:00" (8 pm in that time zone) instead of
"2024-05-05 15:00-05:00" (3 pm).

Writing the timestamp using the system's time zone offset instead of UTC prevents this shift
and preserves the correct displayed time, as long as you are importing into Apple Photos on
a system using this same time zone offset of -06:00.

How should timestamps be written?
1. UTC (default)
2. System time zone offset (-06:00) (recommended if importing into Apple Photos on a system set to this same offset)

1

✅ Timestamps will be written in UTC.

Or when selecting the new option:

2

✅ Timestamps will be written using the system time zone offset (-06:00).

Steps to reproduce issue

  1. Have a Google Photos export from Google Takeout
    1. Or alternatively, create a folder with a minimal sample of a Google Photos takeout:
      1. Create a folder with a sample JPG named photo.jpg.
      2. Give it the expected attribute:
        exiftool -overwrite_original \
            -DateTimeOriginal="2021:03:05 14:35:43" \
            photo.jpg
        
      3. In that folder, create a JSON file named photo.jpg.json with this content:
        {
            "photoTakenTime": {
                "timestamp": "1614976543",
                "formatted": "Mar 5, 2021, 8:35:43 PM UTC"
            }
        }
        
  2. Run that folder through MetaSort using the How to Use MetaSort instructions.
  3. Import the photo into Apple Photos on macOS (drag it onto the Apple Photos window).
  4. Go to Apple Photos > Imports > Select the photo > Cmd + I.
  5. Expected: The photo's time is 2:35:43 PM, which is what would have been displayed in Google Photos
  6. Actual: The photo's time is 8:35:43 PM.

Add an option to export files with a DateTimeOriginal in UTC (default,
current behavior) or optionally in the system's local time zone. This
provides a workaround for an issue where files processed by this tool
and imported into Apple Photos may have incorrect dates/times due to
Apple Photos always assuming the DateTimeOriginal value (which does not
include an offset) is in the system's time zone. If the user knows they
will be importing their media into Apple Photos after processing it with
MetaSort, they can choose a new option to export files with a
DateTimeOriginal in the system's time zone instead of UTC.

A prompt and explanation of UTC vs. system time zone export is displayed
to the user. The default is the current behavior of exporting in UTC.

```
❓ Should timestamps be written in UTC (default) or using your current system time zone offset (-06:00)?

Timestamps get written to the DateTimeOriginal EXIF field. By design, this field does not
contain a time zone offset, only a date and time in the fixed YYYY:MM:DD HH:MM:SS format
(but other fields may contain an offset). Some apps like Apple Photos ignore the offset field
and interpret DateTimeOriginal in the local system's time zone offset. So if a photo
originally taken at "2024-05-05 15:00-05:00" is imported into Apple Photos with
a DateTimeOriginal converted to UTC "2024-05-05 20:00" (notice no time zone offset) on a
system set to a time zone offset of "-05:00", the Apple Photos interface will show that
the photo was taken at "2024-05-05 20:00-05:00" (8 pm in that time zone) instead of
"2024-05-05 15:00-05:00" (3 pm).

Writing the timestamp using the system's time zone offset instead of UTC prevents this shift
and preserves the correct displayed time, as long as you are importing into Apple Photos on
a system using this same time zone offset of -06:00.

How should timestamps be written?
1. UTC (default)
2. System time zone offset (-06:00) (recommended if importing into Apple Photos on a system set to this same offset)

1

✅ Timestamps will be written in UTC.
```

Or when selecting the new option:

```
2

✅ Timestamps will be written using the system time zone offset (-06:00).
```

1. Have a Google Photos export from Google Takeout
    1. Or alternatively, create a folder with a minimal sample of a
       Google Photos takeout:
        1. Create a folder with a sample JPG named photo.jpg.
        1. Give it the expected attribute:
            ```
            exiftool -overwrite_original \
                -DateTimeOriginal="2021:03:05 14:35:43" \
                photo.jpg
            ```
        1. In that folder, create a JSON file named photo.jpg.json with
           this content:
            ```
            {
                "photoTakenTime": {
                    "timestamp": "1614976543",
                    "formatted": "Mar 5, 2021, 8:35:43 PM UTC"
                }
            }
            ```
1. Run that folder through MetaSort using the [How to Use MetaSort
   instructions](https://github.com/iamsanmith/MetaSort#-how-to-use-metasort).
1. Import the photo into Apple Photos on macOS (drag it onto the Apple
   Photos window).
1. Go to Apple Photos > Imports > Select the photo > Cmd + I.
1. Expected: The photo's time is 2:35:43 PM, which is what would have
   been displayed in Google Photos
1. Actual: The photo's time is 8:35:43 PM.
@curtgrimes curtgrimes marked this pull request as ready for review November 16, 2025 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant