Announcement

Collapse
No announcement yet.

File Dates

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    File Dates

    I received this photo in a IM yesterday that I saved to my phone (Moto G Android) Today I copied it to a folder and then shared it to my PC via KDE Connect. On the phone it is saved as Mar 31, 2022 11:37 AM (which is today)
    Here is the screen shot of properties screen. My question is how did this picture get a modified date of over 53 years ago? The quick fix is to save as 702.jpg but I still want to know why this could happen.
    Click image for larger version

Name:	Screenshot_20220331_140044.png
Views:	155
Size:	52.9 KB
ID:	661924


    #2
    That date is close to the "epoch", 1970-01-01 00:00, so it looks like the epoch in PST. (Unix, and so most systems now, stored dates and times as seconds since the epoch.) That means the modified item was set to zero.

    Dates on files with metadata can confuse things, as the file system has dates and metadata have dates.
    Regards, John Little

    Comment


      #3
      Originally posted by jlittle View Post
      That date is close to the "epoch", 1970-01-01 00:00, so it looks like the epoch in PST. (Unix, and so most systems now, stored dates and times as seconds since the epoch.) That means the modified item was set to zero.

      Dates on files with metadata can confuse things, as the file system has dates and metadata have dates.
      So maybe this "epoch" date came from the phone the picture was taken with? Or maybe it's a feature of the IM software? I have had odd issues with Apple vs Android phones and their software, not to mention Windows and Linux.

      Comment


        #4
        I do what you do quite a lot because it is an easy way to transfer photos and files to and from my Samsung GS10 with Android. However, not a single picture, and I checked quite a few, that I transferred this way ever got its modified date zeroed out.

        I would uninstall KDEConnect with purge from both your phone and computer. Make sure you delete the files in ~/.cache, ~/.config, etc... Install mlocate and then use its locate command to locate all the files with kdeconnect in their names after you purge kdeconnect. There will be a lot.
        When the config files are gone then reinstall kdeconnect on both devices and re-pair them. Then send that picture through again and see if the problem persists.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          I transferred a photo that I took and it had a similar problem. The modified date was the date I took the picture March 21, but the created and accessed date were April 1. It will be a few days before I reload KDE Connect

          Comment


            #6
            Uninstalled and cleared all the data, reinstalled and the problem persists. I'm blaming the original device which is an Iphone that took the original picture and sent to me via a Apple tablet from another user. I've had compatibility problems with Apple before and I'm just going to chalk it up as more of the same and move on.

            Comment


              #7
              I should have thought of this when you first posted, sorry. A script can overwrite the bogus modified times with the creation time. Here's a one-liner:
              Code:
              find . -mtime +$(( 40 * 365)) | while read file; do touch -m @$(stat -c %W "$file") "$file"; done
              It finds all files in the current directory and below that have a modified time more than 40 years ago and runs stat to get the creation date and time, and touch to set the modified date and time to that, one file at a time. I'm sure there's simpler ways, but that's my quick effort.
              Regards, John Little

              Comment


                #8
                I ran just the "find" part and a few files showed up. Maybe blaming Apple was the easy way out. FYI, I only noticed this when I went to sort the files in a folder by date and what I thought should be the latest (702.jpeg) was the first.

                fred@fred-HP-Laptop-17-bs0xx:~$ find . -mtime +$(( 40 * 365))
                ./filedates/702.jpeg
                ./Documents/cars/Lotus/Dietsch/702.jpeg
                ./Music/Jazz/Carlos Santana/The Swing Of Delight
                ./Music/Rock/Lee Michaels/Lee Michaels (Remastered)
                ./Music/Rock/Lee Michaels/5th/Lee Michaels - 5th.sfv
                ./Music/Rock/Lee Michaels/5th/Lee Michaels - 5th.jpg
                ./Music/Rock/Santana/The Swing Of Delight
                ./Music/Rock/Who/Who Are You/The Who - Who Are You - cd label.jpg
                ./Music/Rock/Who/Who Are You/The Who - Who Are You.jpg
                ./Music/Rock/Who/Who Are You/The Who - Who Are You - cd inside.jpg
                ./Music/Rock/Who/Who Are You/The Who - Who Are You - cd front.jpg
                ./Music/Rock/Who/Who Are You/The Who - Who Are You - cd inlay.jpg
                ./Music/Rock/Who/Who Are You/The Who - Who Are You.sfv
                ./Music/Rock/Who/Who Are You/The Who - Who Are You - cd back.jpg
                ./.local/share/Trash/files/702.jpeg

                Comment

                Working...
                X