Skip to main content
TheRedKnightMike
Participating Frequently
November 7, 2022
Question

Oddness in PDF timestamp metadata fields?

  • November 7, 2022
  • 2 replies
  • 6568 views

Our org has a small collection of PDFs from which we pulled the timestamp metadata, to help track how old a given PDF really is... file server timestamps can change depending on when a file was last copied, moved, etc.

Fair enough. But I don't understand what I'm looking at; it doesn't seem to make sense.

An older PDF has a XMP metadata Create timestamp of: 2011-09-18T16:27:50-04:00

But if one views this PDF's Properties within Acrobat, it gives the Create time as:  9/18/2006 3:27:50 PM  (i.e., 15:27:50)

Why is there a one hour difference?

As I understand it, Acrobat stores timestamps with offsets that basically mean, in this example, the PDF was "created at 9/18/2011 16:27 local time, and that local time was 4 hours behind Zulu Time". (See this for a little more background on its XMP timestamps.)

Okay; this sounds fine. But still,

Why's it showing one hour difference between its Property popup and its own XMP data?

Could it be because of Daylight Savings Time? DST would indeed have been in effect at that time and place; the PDF was most likely made on the U.S. East Coast, and September is during DST. This makes it be -4 relative to Zulu instead of the usual -5.

But even if the Properties are "quietly decoding" the DST difference, um ... how can it even do that? Does it keep a lookup table somewhere of all historical DST differences that have ever existed, so it knows how to handle this? That would seem super awkward.

And it still would not have been the actual local time anyway... wouldn't that have been 4:27 PM?

So why doesn't the Properties popup just say 4:27 PM??

I must be missing something. Can anyone help?

This topic has been closed for replies.

2 replies

Legend
November 7, 2022

Acrobat doesn't have to do this. It may well be asking the system to format the date for the local time zone (based on knowing what it was in GMT/UTC). The system certainly knows about past and future daylight savings. 

TheRedKnightMike
Participating Frequently
November 7, 2022

Uh... what is it that you're saying it doesn't have to do? I don't even know what it is doing. Is it doing some DST transform, even when that would not be the actual time when it was created or modified locally? Why would it do that? Why show it as two separate times? 

 

I don't understand what's going on here. Can someone explain?

 

Here's a screen cap of the initial Properties popup (on left) next to the bottom of the Additional Metadata popup (on right):

 

And here it is in Additional Metadata / Advanced / XMP Core Properties of the same PDF:

 

This latter (the XMP) is what we get if we extract metadata from the PDFs. But then I see it's not what it actually shows in Properties (see above). Why? Stated another way: I would like for people using the app I'm developing to actually see what the PDF says when you look at its Properties. So I need to know why it's different. And exactly when it will or won't be off by an hour... or whatever else might be going on.

 

What does it think it's showing in the two places? What is the one, and what is the other? And why is it doing that?

 

Thanks if anyone can help!

 

MikelKlink
Participating Frequently
November 7, 2022

As mentioned in my original comment, have you checked the internals of the PDF? In particular, does the Info dictionary also contain a created date? And if it does, is it different from the date in the xmp metadata?

MikelKlink
Participating Frequently
November 7, 2022
quote

An older PDF has a XMP metadata Create timestamp of: 2011-09-18T16:27:50-04:00

But if one views this PDF's Properties within Acrobat, it gives the Create time as:  9/18/2006 3:27:50 PM  (i.e., 15:27:50)

Why is there a one hour difference?

If I read your dates correctly, it's not merely a one hour difference but instead a five years and one hour difference.

One hour might be explainable by DST or other time zone effects, but five years?

 

Consider looking into the PDF once again, there is not only the XMP metadata but also an Info dictionary which can also contain a creation date. Maybe the two places with a creation date simply are not in sync...

TheRedKnightMike
Participating Frequently
November 7, 2022

Hi - My bad - it is 2006 in both places... I had accidentally copied just the year wrong, from the last modified timestamp. Arg, I don't see a way to edit my OP.

I can put the "Additional Metadata" popup right next to the original Properties popup. It shows a one hour difference. I don't see how that can be. It shows this for both the Create and Modify timestamps... relative to what is shown in the Properties popup, it is one hour later at the bottom of the Additional Metadata (and if you drill down to the XMP data, and if we copy metadata out of our PDF collection into a dataset).

I don't understand how this can be. Surely it must make sense somehow. But how?