[google drive] preserve timestamp when downloading

2,651 views
Skip to first unread message

Benoit Bertrand

unread,
Dec 16, 2012, 1:41:39 PM12/16/12
to tacitd...@googlegroups.com
Hi,

I am new to FolderSync. I have been reading around trying to find an answer to a small issue I am facing.

It seems that when downloading a file from my Google Drive account down to my android tablet, timestamp of the file is set to the downloaded time, rather to the last modification timestamp that I can see on Google Drive.
=> Is this a normal behavior ?
Hence, it appear quite difficult to have a correct sort order on my android device.

Here is what I do:
- on my android phone, I use FolderSync to upload to Drive pics taken with my phone (config: bidirectionnal)
- after upload, I can see that timestamp on Drive matches timestamp on my phone (eg. photo taken on June 10th 2012).
- next, on my Nexus 7 tablet, I use FolderSync to download pics from Drive (config: bidirectionnal).
- after download, all downloaded files have their timestamp set to the downloaded time (eg. today, Decembre 16, 2012 - 7PM).

Thank you for your help ;)
--
Benoit

Support User

unread,
Dec 16, 2012, 1:48:35 PM12/16/12
to tacitd...@googlegroups.com
When downloaded from any source, the modified timestamp of a downloaded file is set to the modified timestamp of the source file using the Java File.setLastModified() method.

For some reason this does not work on all devices and/or Android versions. When it doesn't work, the modified time will also be the download time. To my knowledge there is nothing more I can do about this, but any programmers out there feel free to correct me.

Best regards
Anders Carlsen
Software Developer

If you like our apps, please give them a 5-star rating. Thanks. :-)
 
Tacit Dynamics


Benoit Bertrand

unread,
Dec 17, 2012, 7:18:19 AM12/17/12
to tacitd...@googlegroups.com
Hi,

Thank you very much for your reply.

Do you think that I should test with the same 2 devices using dropbox rather than Drive?
(I am asking since I do not have any Dropbox account)

Regards,
Benoit

Benoit Bertrand

unread,
Dec 17, 2012, 5:14:51 PM12/17/12
to tacitd...@googlegroups.com
OK, apparently, it's because the Nexus 7 uses MTP

Benoit Bertrand

unread,
Jan 4, 2013, 5:57:33 PM1/4/13
to tacitd...@googlegroups.com
Could it be possible to upload / download by last mod. timestamp rather than alphabeticaly ? Even if original timestamp is not kept at least the source order is kept.

Regards,
Benoit

On Sunday, December 16, 2012 7:48:35 PM UTC+1, Anders wrote:
Reply all
Reply to author
Forward
0 new messages