mholt / timeliner

All your digital life on a single timeline, stored locally -- DEPRECATED, SEE TIMELINIZE (link below)

Home Page:https://timelinize.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Set Last Modified time according to timestamp

txtsd opened this issue · comments

commented

I'd like my retrieved photos and videos to have a creation/modification date as is in the filename of the files retrieved from Google Photos.

All Google Photos media items are stored with the timestamp when the media was created (i.e. when the photo was taken), and a modification timestamp is also stored if any local changes are made (not yet supported, but the DB field is there). The photos are already organized into folders by creation timestamp.

Hello
Maybe I have the same question @txtsd had. I'm quite suprised the way file timestamps are handled.
I have some examples were the photo is correctly located in term of folder e.g "timeliner_repo\data\2005\03\google_photos" but not in term of file timestamp e.g 20210105. As a result, if I use third party tool to display my photos in local e.g Windows Photos, which is based on creation date to organize file display, it's completly the mess. Photos are mixed : 2021 with 2005 and other past years...
If you were able to determine 2005 folder why the file creation date is not relative to 2005?
Maybe the 2 following screenshots will be useful.
GooglePhotoDisplay2005March
WindowsExplorerDisplay2005March
WindowsPhotosDisplay2021January
Could that issue be linked with the fact that Google photo date is not the original file creation date but was updated later as metadata?
Anyway, big thanks to your useful project. Hoping I could contribute.

@grandyop If I understand correctly, you want the file system's file metadata to have the Created timestamp be the same as the timestamp that the photo was originally taken on the camera? The timestamp Windows is showing you is likely this file system metadata, not photo EXIF metadata.

@mholt in my examples ,photo details timestamp is about year 2005 (18th of March 2005) in Google photo (1st screen)
in filesystem file timestamps DSCF0284.JPG is about 2021 (5th of Junauary 2021) (2nd screen) when I used timeliner except the folder which is correct : 2005 (2nd screen)
as a result third party tool is reshaping the timeline based on filesystem file timestamp and displays a lot of photos in 2021 instead of 2005 (in that particular case) (3rd screen)
Basicaly I want win photo display to look likes my Google photo display.
Is it clearer for you @mholt ?

in my examples ,photo details timestamp is about year 2005 (18th of March 2005) in Google photo (1st screen)
in filesystem file timestamps DSCF0284.JPG is about 2021 (5th of Junauary 2021) (2nd screen) when I used timeliner except the folder which is correct : 2005 (2nd screen)

Right. To clarify, that is the expected behavior. The photo has metadata embedded within it with the timestamp the photo was taken. Windows is showing you file system metadata which is different, that's the date the file was created on your disk.

as a result third party tool is reshaping the timeline based on filesystem file timestamp and displays a lot of photos in 2021 instead of 2005 (in that particular case) (3rd screen)

I would file a bug with the third party tool. Photo editing tools should know better than to ignore embedded EXIF data.

But as you can see in screen2 some of the files dowloaded by Timeliner have FS timestamp 2005 wheras others 2021. Why? All should have FS timestamp 2005. Is there a link with the way I initialy upload them in Google photos? For sure I uploaded them long time ago. So I still not understand that behaviour

I see... I don't know what to tell you though; Timeliner doesn't modify the files, it just saves them byte-for-byte as they are downloaded from the service. Was the date modified/corrected using the Google Photos app or website? If so, maybe it is not embedding that change into the file itself when it is downloaded.

Metadata is not stored in the file but rather in the filesystem. Hence byte to byte copy will not preserve it. https://superuser.com/q/1160927/79099. You could try if using os.Chtimes api will work and if the bytes doesn't change. https://golang.org/pkg/os/#Chtimes. Some filesystems also support extended attributes which are not part of the file. https://en.wikipedia.org/wiki/Extended_file_attributes.

@prabirshrestha Sorry, but I don't think that has anything to do with this. The problem is the original timestamp appears to be missing entirely. There's no way for Timeliner to invent it.