Iterates over photos in given Google Photos album and edits date/time/timezone of each photo in order to fix their order
Switch branches/tags
Nothing to show
Clone or download
pawitp and grubyak Update date picker code (#2)
Fixes the script to work on the current versions of Google Photos.

The two problems were:
 - When a new timezone is selected, the dropdown field was not updated
 - The script failed to verify the current timezone
Latest commit 53c18a0 Jun 10, 2018
Failed to load latest commit information.
LICENSE Initial commit May 8, 2017 Update May 8, 2017
google-photos-tz-fix.js Update date picker code (#2) Jun 10, 2018


This script iterates over photos in given Google Photos album and edits date/time/timezone of each photo in order to fix their order.


Sometimes photos uploaded to Google Photos are arranged randomly and not based on the time/date that they were taken. This happens due to the fact that timezone included in EXIF is not respected and usually GMT-5 is being used instead, while timezone of the rest of the photos stays as orignally provided.


  1. Rearrange photos by hand (photos will again appear in wrong order if you will sort album)
  2. Select some/all photos and select "Edit date & time" option and then
  • shift selected photos to another timezone - make sure to not shift photos with correct timezone
  • set one date/time to all photos - your photo timeline will be flatten to one day and still order of the photos might not be correct

Both workarounds are not ideal which led me to implement this script which fixes date/time/timezone of each photo.


  • you need to edit script and set EXPECTED_TZ to desired timezone
  • your photos needs to follow naming pattern YYYYMMDD-HHMMSS-NR, for example: 20170414-204918-2042.jpg
  • you need to install Tampermonkey plugin in your browser (only Chrome was tested)

how it works

  • script iterates over photos of currently open album and executes following steps
  • "Edit date & time" option is selected
  • timezone setting is being checked
  • date/time included in photo filename is being compared with values from the dialog
  • an update is performed in case if timezone/date/time is incorrect
  • changes (if any) are being saved
  • script stops is case of error or when end of album is reached

how to use it

  • open Tampermonkey options and add google-photos-timezone-fix script
  • navigate to and open album which you want to edit
  • open first photo and open photo details sidebar by clicking "info" icon
  • open browser console and type window.fixAlbum()
  • observe log in browser console for additional info
  • go back to album view and see if the order is corrected (you might need to sort entire album by opening it and selecting "Edit album" > Arrows icon: "Sort photos" > "Oldest first", this time photos will be properly sorted as date/time/timezone got corrected by the script)