News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • File modified dates affected by time change

    Home Forums AskWoody support Windows Windows 10 Questions: Win10 File modified dates affected by time change

    This topic contains 3 replies, has 2 voices, and was last updated by  mn– 1 week, 6 days ago.

    • Author
      Posts
    • #1999686 Reply

      BobStr
      AskWoody Plus

      Whenever there’s a time change, as occurred a few days ago, duplicate files that I have stored on external drives end up being off by an hour in comparison to the copies on my laptop. Just recently, for example, after the time change, I updated several files that I had on a pen drive. When I later ran a comparison to conform the copies on the laptop, because the clock had been moved back the comparison indicated that every single file on the pen drive was newer than the corresponding one on the laptop.

      I therefore have a couple questions.

      First, in my current situation, with numerous files on the pen drive now out of snyc with those on the laptop, is there a (convenient, I hope) way to change the modified date by an hour on the unchanged files on the pen drive? If so, how?

      Second, is there a way to avoid this sort of problem in the future? And again, if so, how?

      Thanks.

    • #1999973 Reply

      mn–
      AskWoody Lounger

      Are those external drives in one of the FAT formats, NTFS, or something else?

      Because traditional FAT timestamps are always assumed to be in current local time, whatever that is.

      NTFS times are stored as UTC and then converted to local. Laptop internal would be these…

      ExFAT can do either and has a timezone field to go with it… and is handled inconsistently between various systems and independent access routines.

      What you can do about that is keep all removable media as NTFS. Too bad that cameras and such usually can’t handle that.

      Various tools exist to correct file times, but what is convenient is another thing… hm, did the 1903 version of Windows Subsystem for Linux use removable media correctly? If it does, then you should be able to do “cd $pendrive ; for i in $( find . -type f ) ; do touch -r $i -d ‘-1 hour’ $i ; done” or something like that.

      1 user thanked author for this post.
      • #1999975 Reply

        BobStr
        AskWoody Plus

        Alas, that’s not the sort of thing I generally think about, so I have to say I don’t know, with an explanation.

        I suspect that the pen drive was in FAT, but if it was, it is no longer. The reason: it contained over 6000 files for one particular program, but after the time change I had updated only 10 or 20 of them. I easily identified those files and used them to update my laptop files. Then, rather than use my syncing program to deal with the files that were simply an hour off, I reformatted the drive and recopied the entire set of files from the laptop to the pen drive.

        When I clicked on the drive to format it, the default option was FAT.  Or maybe it was that option only because the drive was already formatted in FAT? I didn’t think to check. I just proceeded to reformat the thing in NTFS.

        It sounds, based on what you said, that with the drive now formatted in NTFS, I should be good to go with respect to future time changes. I have (I hope) understood that correctly?

        Thanks.

        • #1999977 Reply

          mn–
          AskWoody Lounger

          It sounds, based on what you said, that with the drive now formatted in NTFS, I should be good to go with respect to future time changes. I have (I hope) understood that correctly?

          Yes.

          And besides, your laptop internal disk is NTFS anyway, right? So at the very least they should behave the same… I mean, plenty of those Windows 10 cumulatives have timezone-related stuff in them and I wouldn’t know if you’d happen to be in one of the affected timezones…

          1 user thanked author for this post.

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: File modified dates affected by time change

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.