Alamantus / GooglePhotosExportOrganizer

A (defunct) tool for merging and organizing exported Google Photos backups. Built with React and Electron!
https://alamantus.github.io/GooglePhotosExportOrganizer/
73 stars 2 forks source link

International Dates Cause App to Skip File #17

Open Alamantus opened 2 years ago

Alamantus commented 2 years ago

The Organize process makes several checks to validate the photoTakenDate in the file's .json metadata. Unfortunately, the app was only built with English in mind, but Google allows exporting in the user's native language, which means that JavaScript's new Date() parsing fails on anything that isn't English, causing the app to skip the file because it couldn't be validated. How charming!

To fix this, I'll need to find a date parsing library that can handle any language. This will go hand-in-hand with issue #13.

omia commented 1 year ago

Just out of curiosity. Why don't you use the timestamp? photoTakenTime = meta.photoTakenTime.timestamp; const date = new Date(photoTakenTime*1000);

Alamantus commented 1 year ago

I'll have to get a copy of an export again to see if timestamp is consistently provided on photoTakenTime, but if it is (or always has been), then that sounds like an excellent idea!