Google Drive does not preserve file modified date / time

Google Drive does not preserve file modified date when copying and overwriting an existing file. The file modified date is an important piece of information about the file and should not be lost by a file copy operation.

Example using Google Drive with web browser file upload:


1) Upload a new file to Google Drive via web browser. The modified time is correct. (i.e. the modified time in the cloud matches the modified time of the local file.)

 

2) Upload the same file to Google Drive via web browser, overwriting the existing file, and it now has the wrong modified time. Expected behavior: When copying a file and overwriting an existing file, the modified time of the source file should be preserved.

Example using Google Drive for Desktop (Windows):


1) Copy a new file to the "G:\My Drive\" folder. The modified time matches the original source local file. (The file's modified time is correct, both in the cloud and the local cached modified time.)

2) Copy the same local file to the "G:\My Drive" folder and overwrite the original. There are now two problems:

a) The copied file has the wrong modified time in the the cloud (checked using Google Drive via web browser). The modified time is the current time instead of the source file's modified time.

b) The file's local cached metadata in Google Drive for Desktop does not reflect the same modified time as the cloud storage. (Checked by comparing the modified file time on "G:\My Drive" to the same file in the web browser).

The behavior of Google Drive for a file copy operation with overwrite is not standard or expected behavior for most file systems (e.g. NTFS, EXT4, BTRFS, XFS, etc). (updated 2023-May-01).  It creates many problems with file and directory comparison tools, backup tools, etc. This behavior creates situations where data is lost because a user or utility makes the wrong decision about a file because the modified date is incorrect. (i.e. an old file with a new modified date)

20 65 38.3K
65 REPLIES 65

Lets say we have a small drafting team and are doing work with one of our customers using Windows and Google Drive for Desktop (G:\ drive):

1)  The customer sends our team a set of 200 architectural CAD files for an important project. (e.g. the files are dated 2008-Jan-01 to 2021-Jan-01)

2) One of our team (User A) copies the files to our Google Shared Drive. (the files get the correct modified dates)

3) Another member of our team  (User B) has a copy on his desktop and has made some changes to 50 of the files. (his new files are dated 2021-Jun-02 to 2021-Jun-15).  He copies the folder from his desktop to his G:\ drive, but doesn't want to review every file one by one, so he tells Windows to overwrite the whole folder and all files in it.  Instead of keeping the correct modified times, all the times get changed to the current time and date (2021-Jun-20).  At this point, all file modified times have basically been destroyed and have become meaningless.

4) There is no longer a way to determine which files had been modified by user B.  When the customer sends us an updated set of files,  it is not possible to determine which files have been updated by comparing their modified files times with our set of files. BUT, NO ONE ON THE TEAM IS AWARE OF THIS ISSUE.  They expect the G:\ drive to work just like their other drives.

5) Now user C does a file compare of the customers new set of CAD files, and uses the file modified times to update the files on Google Drive.  No one is aware, that in the process he wipes out some of the files we had modified and he fails to copy some of the updated files from the customer since they appeared to be older, but are in fact newer.  We are left with a broken set of 200 files, which are missing important revisions from the customer and from us.  BUT NO ONE ON THE TEAM REALIZES THAT THIS HAPPENED.

6) We then proceed to execute our part of the project.  Our company ends up loosing a significant amount of time and money since we worked from a set of files that were incorrect.  We lose our customer because they missed an important deadline.

Hi Wayne,

There are a few workarounds using different workflows, Vault or the Drive API, but if the objective here is to minimise counterproductive workflows I'd suggest having all users working on the same folder, using the Drive client, instead of working in an external folder and then copying files to the Google Drive folders. This way the last modified date will match the date of the changes and not the date in which the new file has overwritten the old one.

In any case, if a user uploads a new set of files, even if the modified date of the files is not a reliable filtering criteria, you might find it helpful to filter by "Modified by me" instead of "Modified", from the account of the user that made the latest changes. This way that user can see which files have changed using his/her account. After that the user can even apply metadata to the new files (a label like "Reviewed").

 

I'd also like to clarify Google Drive's behaviour regarding modification dates:

 - Since last year most upload methods will respect the local timestamp. Only uploads from iOS and Android will apply the timestamp reflecting the upload time and date

 - With that said, when you edit a file that's already in Google Drive (even using a local app, providing you have the Google Drive sync client) a new timestamp will be added, matching the date of the last modification (that's why I mentioned that you should work with the files in that folder instead of an external folder with copies of the files).

 - HOWEVER, when you let the OS' default behaviour overwrite an existing file (using the local file explorer) Google Drive will create a new revision of the previous file and the creation date of the new file revision will be recorded as the new timestamp, which, in my opinion, makes sense because the date of the last "modification" was the date in which the old file was replaced with the new one.

 

A possible functional workflow for you might (or might not) be using the local file manager's viewing options to sort files in the Google Drive folder by "Date Created" or "Date last accessed" instead of "Date modified".

 

In any case, I would, again, highly recommend working with the files in the Google Drive folder, as this is the most streamlined and intuitive workflow and it would avoid the issue with the "misleading" timestamps.

 

Hope this helps!

 

Best regards,

Nuno

Cloud Guardians

Thanks for your reply.  In some cases you can't work on the files directly from the Google G:\ drive.  As in my example above, you might be getting a whole set of updated files from another party and have to replace all or some of the files in a tree.  You will lose the modified times of any files that already exist.

A solution would be for Google Drive to store two modified file times for each file:

1) OS file modified time - always reflects the OS assigned modified file time.

2) Cloud file modified time - always reflects the last modified time in the cloud

Implement a new Google Drive setting that defaults the Web UI to show one or the other, selectable by the user.  Google Drive for Desktop can also have a setting which defaults the file modified times to either show the OS or Cloud file modified times.

You might want to post this to the Feature Ideas section here (https://www.googlecloudcommunity.com/gc/Feature-Ideas/gh-p/workspace-ideas-group) so that it can be upvoted by others and possibly considered as a future feature enhancement.

If you are submitting a feature idea, be sure to explain the problem that you're trying to solve with the feature idea, not just the idea itself. For example, saying "when my users are trying to do 'A', they often get confused by the fact that the buttons to do 'X' and to do 'Y' look quite similar to each other, which leads to this unintended consequence" is far more likely to get fixed than a feature idea that just says "change the color of the button 'Y'".

Cheers,

Ian

I'm awfully suprised that the GooDrive's behavior is considered as normal. If you make OS think that GooDrive is fixed disk (as it appeared) it should behave as fixed disk by default - without any surprises. Our organization is trying to move to the cloud - but if this feature is unavoidable we are leaving. from Google. 

v0v
Bronze 4
Bronze 4

The case is that if I copy some file (let's say it was last modified in 2019) and later I've overwrited it by another version modified in 2020, I'll see this file (from THE SAME account on another PC) as modified in 2021 !!! One more time: I'll see the same file at the same time from two different PCs (logged in from the same account) as file modified in 2020 (from one PC) and modified in 2021 (from another PC). At the same time!!!

Hi all! It looks like there is no progress with this extremely annoying issue. I'm deeply surprised. What is going on? Google drive's presented itself on PCs like fixed drive and at the same time it doesn't produce expected behavior (similar to all other file systems). And nobody cares? Or nobody uses Google drive in real multi-user environment? :((

One of the best ways to submit bugs/feedback on a Google product is via the "Send feedback" in the product itself. So, for Google Drive for Desktop on my Mac, that looks like this: 

icrew_1-1636997813901.png

In my experience from other unrelated bugs, it often takes a minimum of several months between a bug being identified and it getting fixed (and Google is far from alone in that -- it seems to be pretty typical across the industry, sigh).

Hope that helps, at least a little,

Ian

Dear Ian, thank you very much, I'll try! But I'm surprised that Google is not overwhelmed with thousands of bug reports concerning this bug. For our company this bug means Gdrive is useless (harmful, to be more precise) - and I suspected we are not alone. ๐Ÿ˜ž

Thank you again!

Best!

yep good idea

Screenshot_31.png

Hi folks--just popping in to say that we are investigating. We aspire to behave as any other mounted drive on your computer (and follow OS specific oddities), but it looks like we are missing the mark.

I also wanted to thank you all (Wayne Sherman especially) for detailing your use cases and repro steps. It really helps us understand the problem so we can arrive at the right solution. CloudGuardians is correct that the way to avoid this trouble is to work directly in Drive, but hearing about the use cases helps the team understand the cases where folks can't do that! Thank you for engaging and I hope to be able to report back soon.

Dear JC, please keep in mind other two issues.

1) if somebody renames the file - file modified time is changed to the moment of renaming. This is not expected behavior if we emulate Gdrive as  fixed drive. 

2) If I overwrite some file on google disk from offline source (and let's say file's modified time is yesterday) - I will be seeing this overwrited file on google disk as modified yesterday until I switch off the account. As soon as I logged in account again - I'll see it as modified today (time when it was overwrited). Other people see this file as modified today from the moment it was overwrited. The same behavior (update on account logoff/logon) one can see with file renaming (mentioned above). 

Thanks for explaining ways this braindead feature of Google Drive might royally screw up an organization's work.

I just noticed this behavior myself and what a bummer you can't count on file timestamps with Google Drive!

I cannot imagine why any piece of file streaming software that works on it's own schedule (i.e. in the background) and is at the mercy of the user's internet connection and process management can take the liberty to put its own, inconsistently enforced timestamps on some but not all of the user's files.  

How many years has this been going on unaddressed? 

I should seriously stop using Google Drive.........

Hello I am writing to ask what progress has been made on this issue?  I have a similar concern to the one @WayneSherman described with regard to date shown on google drive files. I have a project with students and we work exclusively in a shared drive. We decided to slightly change file naming conventions, and unfortunately when we renamed our files, that changed ALL dates to today's date, and we no longer can tell which are our current files!  A bit of a disaster.  Any ideas?  thanks.

I used Google Drive as a temporary backup while we reconfigured our backup server.  Now that I'm migrating the files back, they all have the same date.  What a waste of effort and time.  Completely disfunctional.  The overriding message seems to be that you can come into the Google environment, but don't even think of leaving it.   

Hi Wayne,

Thanks and I am glad I found your post, I completely concur with you.

I was having problems today with a massive migration of files in Google Drive client.

To make sure I was uploading the correct (latest) version of the files (from a legacy file server), I had to overwrite whatever files were already in Google Drive. But to my horror the initial date of the files 2017, 2018, etc... was changed to today 2022! What a huge mess!

The integrity of the original date should not change because technically the file was not modified, it was only uploaded from a legacy server to Google Drive via the Google Drive client (on a PC).

Even when he user would be overwriting the file with the same file, the modified date of the overwriting file should prevail. (The user has already be warned by Microsoft Windows Explorer and has agreed to overwrite the file)

For example, lets assume we have a file file.doc last modified 25/12/2017.

And we overwrite file.doc modified 25/12/2017 by the same file file.doc modified 25/12/2017. The result date in Google Drive should NOT be today 26/03/2022! What a joke.
The result date in Google Drive should remain 25/12/2017. The user has NOT modified the file and Google should respect that.

Now let's say for some reason we decide to overwrite file2.doc last modified 25/12/2017 with another file file2.doc more recent let's say 25/12/2018. Then the result should be 25/12/2018, not today 26/03/2022!

I have contacted Google and created a ticket Case #38311111 but now that I am reading this I understand what had been going on!
Google please improve the Google Drive client because this has been driving me nuts!

Alex

To Google : Case #38311111
For Google clients you may proceed to Wayne's feature request and vote for it: https://www.googlecloudcommunity.com/gc/Feature-Ideas/Google-Drive-Store-OS-and-Cloud-modified-file-...

hi Alex thanks for posting the feature request, but when I try go there it tells me I don't have access.  Is it only members who can vote?  thanks.

Hi Sarah, that section of this site does require you to have access to https://www.googlecloudcommunity.com/gc/Feature-Ideas/cmp-p/grouphub%3Aworkspace-ideas-group. At this time, only Corporate, Enterprise, EDU customers, or customers under NDA have access to it and they also have to request access. If it gets denied and you believe you should have access, you can email gc-customer-community@google.com or reach out to Admin Willie_Turney for assistance.

Thank you Penelope!

Google Drive is reporting the date in which the file has been modified in Google Drive so I absolutely expect to see todays date when I upload against an existing file and replace it with another file. The file in Google Drive WAS modified today and not for example two weeks ago which was when I modified it in the local file system.

You have to remember that objects (files) in Google Drive can be replaced by an entirely different file and they may not be the same local file that one is thinking of.

I don't think anyone is asking to get rid of of the cloud modified time or the way it behaves.  I think the cloud file modified time should continue to be stored and behave the same.

To fix the issue, a second file modified time stamp can be added to each file which behaves the same way a local file system behaves.  Allow the user to set a preference for which modified time stamp is being shown in the client currently being used. (Drive for Desktop or the drive web UI).

For a proposed solution, see here and here.

I want to add some weird findings noted today:

On Google Drive web the date seems correct:

Screenshot_58.png

 

However in Google Drive client (Windows Explorer), it shows 2022:

Screenshot_59.png

 

How is this possible?

The file-time metadata cache on the desktop software gets more out of sync over time and will show different times than what is in the cloud.  To reset the cache and see the file-time as it exists in the cloud, you can close Google Drive for Desktop and delete the local cache:

Configure Google Drive for desktop

https://support.google.com/a/answer/7644837?hl=en

ContentCachePath

Warning: Be cautious about clearing the Google Drive for desktop cache to try to fix general problems. Files are moved here before they're uploaded. If you clear the cache before an upload is complete, that file will be lost.

 

I have found the local Google Drive for desktop cache (which is stored in an sqlite database) often contains incorrect file times (probably due to other bugs besides the known issues documented here). 

[UPDATE] The "Refresh folder" menu item mentioned below did NOT work for my test (rename a file, the local cache time was showing 2019 and the cloud time was showing 2022.  "Refresh folder" did not update the out-of-sync local modified time with the cloud time.  So, unless someone else knows another technique, the only way I know is to delete your entire local cache which will then be repopulated with the modified file times that are in the cloud.

(see update above)...You can try to force a refresh on a single folder by holding [SHIFT] and right click the folder which contains your file and select "Refresh folder":

Google Drive Folder Refresh.png

You can get more information for a file or folders cloud modified time vs local cached modified time if you do a [SHIFT] right mouse click on the file and select "Copy diagnostic info to clipboard" and paste it into notepad.

The file modified times for both the cloud and local cache will be reported:

# File modified time stored in the cloud
#(as a unix time stamp in milliseconds)
modified_date_millis
: 1651258104191
# File modified time stored in the local cache
property {

key: "local-content-modified-date"
int64_value: 1565099854000
}

Use an online converter to convert the millisecond values to local date/time:  
https://www.epochconverter.com/

Hi! Try to diconnect from your google account and reconnect - you'll probably see the same (incorrect) date at both places.  

Hi Alex,

Try this: on the Windows file manager right-click the header of any of the columns ("Name", "Type", etc.) and select "Date Created" and/or "Date last accessed". Then check those dates instead of "Date modified".

Hi, here is the result:

Screenshot_60.png

As you can see all 3 values show 2022. Which effectively make me loose completely the original creation date (which was in 2008)  and modification date (which was in 2015).

As a matter of fact the file was NOT modified in 2022, it was "merely" uploaded or transferred to Google. I would agree that the accessed date would changed to 2022 because indeed it was accessed.

But I disagree the creation date or modification date would change. The file was NOT modified and in fact the checksum is the same.

IMO "uploading" should not be regarded as "creation" or "modification" if  a prior date is already existing. (Of course arguably if no date exists Google could allocate the date of the day, but in the case of Windows Explorer it exists and should not be altered).

This issue is ludicrous disappointing and unprofessional - set date created in Win 10 drop down.
I called them direct to express my concerns - after 2 years of work redated to that date..  

Almost a year after it was initially reported this issue still seems to be present using Google Drive version 56.0.11.0

Note for those looking for a "work-around" you can use the Google Drive API to set the modifedTime if you have the original modified time of the file. See the docs.

If you have lots of files then this requires you write a script that can iterate over your files and set this value for all files - likely you'll run into some rate limiting if you do that (I'm yet to try - will report back if I can't find a better way).

Another work around is to use other tools that work with Google Drive and preserve file modified times.  For example, the command line utility Rclone preserves the modified times for files copied to google drive (but not folder modified times):

https://rclone.org/

As others have pointed out, it is not only a file copy with overwrite operation that destroys the modified time.  A file rename operation in Google Drive or Google Drive for Desktop also destroys the file modified time:

Sarah-P wrote:

"We decided to slightly change file naming conventions, and unfortunately when we renamed our files, that changed ALL dates to today's date, and we no longer can tell which are our current files!"

So, finally I had some time to dedicate to this. Here we go...

The following conclusions derive from several tests (across several scenarios) of 4 different operations:

  • First-time copy or sync to โ€œMy Driveโ€ or a Shared Drive
  • Syncing from a specified local folder (visible under โ€œComputersโ€, NOT โ€œMy Driveโ€ or Shared Drives)
  • Renaming files
  • Overwriting files

Note: sometimes syncing file changes might take a while and in the meantime you may see the wrong date. In order to properly test this I recommend waiting enough time for the synchronization to go through. And bear in mind that even if the Drive sync client is not showing any ongoing activity there may still be some processes being carried out by the Google Drive API or scanning for malicious content. So be patient before jumping to conclusions. And always refresh windows (on the File Explorer too). And letโ€™s not forget the basics: if needed, restart your computer, restart your Explorer.exe (or Finder, on a Mac), restart your browser, and, last but not least, the good old โ€œclearing cache and cookiesโ€. 

The results below apply to non-Google files created locally and uploaded, synced or copied to Google DriveCloudGuardians_0-1651189797230.png

Notes:
UNDO after renaming or overwriting a file does NOT bring the original date back.

A local UNDO (using the File Explorer) after overwriting a file will not restore the previous version. Instead, it will send the file to the trash (with any revisions it may have). This behavior is consistent with what Windows does with local files when performing and UNDO after overwriting them.

Conclusions:

  1. The first time a file is created there is no issue at all, as in every scenario the original date (of the last modification) is preserved

  2. After renaming a file, on the Google Drive Web Interface the Date is always wrong, but if the same file is viewed using the File Explorer the correct date is preserved in several scenarios.

  3. Overwriting a file results almost always in seeing the wrong date on the web interface. The only exception is with the second scenario (using local File Explorer + Drive sync app to sync a local folder to โ€œComputersโ€).

  4. For the first scenario (using local File Explorer + Drive sync app to sync to โ€œMy Driveโ€ or a Shared Drive), if users work consistently with the local File Explorer they can enjoy a mostly issue-free workflow. There is a cosmetic issue that is only visible on the web interface, after renaming a file, but if the user checks the same file using the local File Explorer the โ€œModified dateโ€ is correctly preserved.

  5. The second scenario is useful for users that donโ€™t care about file revision but do care about seeing the correct Modified date when viewing files on the web interface of Google Drive, since it is the only scenario that allows the original Modified date to be visible on the web interface. However, this is only true if the files were overwritten using the local File Explorer. This scenario also allows the creation of file revisions but for that the web interface will have to be used and in that case the Modified date will not be correct (when viewing that file on the web interface). In any case it gives users the choice.

  6. The third scenario is useful for users that donโ€™t rely on Modified dates to organize files (or their workflows) and want to have file revisions automatically created, and/or prefer to work mostly using the web interface or have a mixed workflow (working with files both locally, using the File Explorer, and on the web interface).

  7. The fourth scenario is a slight downgrade from the second scenario, but it might be appealing for users that like the second scenario but prefer to have a workflow that mixes local and web-based file operations.

Recommendations:

  1. Admins should choose a workflow and try to stick with it. And train end-users to avoid issues and/or to understand why issues may occur and the available workarounds.

  2. My personal recommendation is that features, practicability, and real-life improvisation should be balanced, so Iโ€™d go with the first scenario when possible and use the second scenario when needed (like when using a shared computer or a Chromebook), but knowing the consequences of overwriting files for the modified dates. And Iโ€™d use the other scenarios for different purposes, such as keeping local folders from different computers in sync with Google Drive. This is especially useful for users that work from several computers (otherwise, for users with only one computer,  itโ€™s simply a backup of a local folder).

I really hope this helps.

PS: For better readability, you can also check the following Google Doc: https://docs.google.com/document/d/1-exrq_MkptQpJRK7ZgJm4JuoaDM6u8kaQ-9_OuOVg7Y/edit?usp=sharing

 

Thanks for you testing and report. Please take note of an important point:

> CloudGuardians wrote
> "if users work consistently with the local File Explorer they can enjoy a mostly issue-free workflow."

This is an illusion (a dangerous one in my opinion). The local file explorer has an incorrectly cached copy of what the file time should be. Since it does not match the file modified time stored in the cloud (the "real" file time) I consider this a bug in its own right.  If you look at the same file using Explorer on another computer, the file modified time will not match what you have on your computer.

The Google Drive for Desktop metadata cache is a temporary and volatile database. When it updates or resets, the file modified times you see in Explorer will be gone and change to whatever is stored in the cloud.  (I don't know all the triggers that refresh each file's cached metadata, but you can force a full reset by deleting the cache (see post above), or by uninstalling and reinstalling Google Drive.)  I do a lot of work with folder and file comparison tools, so real world experience has shown me that the local cached view has incorrect file times almost all the time.

Google Drive for Desktop *fakes* the proper handling of file modified times like this:

Scenario A:  Rename a file in explorer on the G: drive
1) Google drive for desktop updates the file name in the cloud, and locally does not change the cached modified time.
2) In the cloud, the modified time is destroyed and replaced with the current time.
3) On the computer where the change was initiated, Google Drive for desktop does NOT update it's local cache to reflect the new cloud time.
4) On other computers, Google Drive for desktop will update the local cache with the new filename and new cloud time. (which now does not match the computer which initiated the file rename)

Scenario B:  Copy and overwrite a file in explorer on the G: drive
1) Google drive for desktop caches the new file contents and the correct file modified time of the source file.
2) Google drive for desktop sends the modified file to the cloud. (but does not send the source file modified time)
3) The cloud updates the file contents and destroys the modified time replacing it with the current time.
4) On the computer where the change was initiated, Google Drive for desktop does NOT update it's local cache to reflect the new cloud time.
5) On other computers, Google Drive for desktop will update the local cache with the new file contents and new cloud time. (which now does not match the time on the computer which initiated the file copy operation)

> CloudGuardians wrote
> "Admins should choose a workflow and try to stick with it. And train end-users to avoid issues and/or to understand why issues may occur and the available workarounds."

I think this is unrealistic. Even in small companies different users have different workflows. Most users are not going to understand the issues or workarounds.

@WayneSherman here is an example of renaming a file from the local file system where the local file system does change the modified time.

local-file-system-rename.mov 

I haven't tested the MAC OS client behavior.  On Windows, Drive for Desktop emulates a FAT32 files system.  When doing a rename, the local file (metadata cache) retains the previous modified time, and the cloud file gets changed to the current time.

(EDIT: I tested the same steps on Windows and found it does have the same inconsistent behavior depending on where the file was first uploaded, via web UI or via Drive for Desktop)

Thanks for this detailed testing summary.

Out of curiosity, how much time is enough time?

On my side I have done another round of checks and found somethings interesting:

(The original file was first created in 2015, even though it is a 2008 document)


1. On web the date is still correct (2015)

Screenshot_124.png
2. On PC1 (used for copying the file from a local NAS samba shared drive to Windows Google Drive Explorer), the date is wrong (2022)

Screenshot_122.png

3. On PC2 used to see the same files locally on another PC, the date is correct (2015)

Screenshot_123.png

So this seems to indicate that the overall process is good and the original creation date seem to be kept in Cloud and in other clients, except that the date displayed date on the local computer that was used to manually copy the files is wrong.

Not sure if this resonate  with your findings, because apparently you don't have this issue, when you said the Date Modified is Correct?

Adding another data point to your fantastic matrix (thanks for doing this!) from a macOS user. On macOS Monterey 12.4, with the Google Drive desktop client (v59.0.3.0), the Last Modified time is correct when a file is first written to the GDrive from the macOS Finder. However, unlike your finding that overwriting that file also yields the correct Last Modified time using Windows Explorer, on macOS, the Last Modified time on GDrive is the date/time that you actually performed the overwrite, and not the Last Modified time of the file as it originally was on the local storage.

Itโ€™s really simple - Google drive synced a mirror copy and redated / metadata all the files to the synced date - in the process of updating the drive for desktop rollout. All this TLDR experiments are a way of saying Drive is not the fault clearly it is. 

Top Labels in this Space
Top Solution Authors