Google drive set modification time as time of upload

Is there a way to set the modification time of uploaded files to be the time of upload ?

Every time I have to use the web interface I can never sort by modification time since it never matches what I expect to.

It seems like they are using UTC time and I upload using a different timezone

what about https://rclone.org/docs/#use-server-modtime

1 Like

Actually this didn't work :confused:

I'm uploading files with $date on the filename and on google drive it shows the modification time as 3 hours later... I guess it's the difference between UTC and the timezone of my $date command

not sure about that but i would try a test on a single file using
https://rclone.org/commands/rclone_touch/

You can try this

  --drive-use-created-date   Use file created date instead of modified date

Which perhaps should be activated by --use-server-modtime too? Though it isn't exactly the same.

Didn't work

image

No matter what I try the date of "last modification" in google drive web interface is always 3 hours relative to my $date command. It's like rclone is not aware of timezones or something when setting the dates

Times in Google drive are sent with timezone.

Are you sure the uploading and viewing computer has time and timezone set correctly?

Yes my laptop, my server and the $date command all have the same timezone but the google drive web interface is not displaying it correctly....

So I really don't know what else to do to make them match!

The times in the google drive web interface display in localtime for me and that is what they should be doing as far as I can tell.

What does this page show for you (using the browser that you are using for google drive) - do the timezones all look like localtimes there?

https://webbrowsertools.com/timezone/