Modified date

Ask for help and post your question on how to use XnView MP.

Moderator: xnview

Pepelu
Posts: 33
Joined: Tue Mar 12, 2024 12:50 pm

Modified date

Post by Pepelu »

Question, warning, this may sound strange.

Is there a limit to how far back you can go to set the modified date?

I am scanning some old photos and trying to set the dates, taken and modified, as close to the time and date that the pictures were actually taken.

In this case is 6/1/1970. I have changed the timestamp for all fields to January 6th 1970, but the File modification date sets itself to 1/1/1980. The rest of the date fields are correctly updated to 6/1/1970
User avatar
michel038
XnThusiast
Posts: 1509
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Modified date

Post by michel038 »

File creation and modification dates are determined by the operating system (Windows, macOS, etc.). Most operating systems use an internal timestamp where “0” corresponds to January 1, 1970, so it's impossible to use previous dates.
You can use 'EXIF dates' to set the correct date for older photos.
Pepelu
Posts: 33
Joined: Tue Mar 12, 2024 12:50 pm

Re: Modified date

Post by Pepelu »

Thanks, I didn't know that.

In my case it must be 1/1/1980 for some reason.
jkm
Posts: 425
Joined: Sat May 11, 2024 12:43 am

Re: Modified date

Post by jkm »

Don't try to set the file modification or creation times for this purpose. One, it's inappropriate, and two, your ability to set them is operating system dependent. You don't say what OS you're using here, but I presume Linux from your earlier posts. Let the file modification date be updated to a current timestamp for backup considerations.

You should modify the EXIF date fields. Here is a guide to help you understand them, since they are referred to by different names in different circumstances. The EXIF Specification has official names, and these names may be used in other applications. Exiftool, an industry standard, uses different names which are also widely echoed in different applications. XnViewMP has its own names. Confusing, but that's just the way it is.

Code: Select all

Exif Specification        Exiftool           XnViewMP        Purpose
DateTime                  ModifyDate         ModifyDate      Date/Time the file was changed
DateTimeOriginal          DateTimeOriginal   DateTaken       Date/time when original image was taken
DateTimeDigitized         CreateDate         DateDigitized   Date/time when the image was stored as digital data
So as you can see, sometimes two of them agree, but all three never match. Generally, disagreeing with the spec is bad. It's also not brilliant to disagree with Exiftool, since it is so widely used and respected. But, the DateTime field is poorly named in the spec. And the CreateDate name was a poor choice by Phil for Exiftool (but he has used it so long, it will not change now). With XnViewMP, Pierre settled on names that best convey what the field is actually supposed to be used for. So the names used by XnViewMP are from that perspective "best" but unfortunately therefore disagree with widely accepted authorities.

Digital cameras always set DateTimeDigitized=DateTimeOriginal.

The reason for having two fields, is you can set one (DateTimeOriginal) to when the original image was taken on film, and the other (DateTimeDigitized) to when the film image was scanned into digital storage (perhaps years later).

The DateTime/ModifyDate field allows for tracking when the image was subsequently changed without touching the other two.

Operating System Filesystem timestamps are different. For example, if you took a JPEG and resaved it as WEBP, the above three fields should be preserved in the WEBP image, but the filesystem dates should be current, because it is a new file.


So for modifying the EXIF fields, if you use the Edit EXIF dialog in XnViewMP, you will not encounter any problem in setting the dates as necessary; even dates before 1970 are allowed.

Hopefully this helps...