How do I convert Lightroom .lrprev fileTimeStamp values to a real date?
Asked 2/25/2015
73 views
2 answers
0
I extracted JPEGs from Lightroom preview (.lrprev) files, but the recovered images have no metadata. Inside the preview data I found entries like:
fileTimeStamp = 346514038.2051
I’m trying to determine whether this value can be converted into a normal date/time so I can write something useful back into the JPEGs with exiftool. Is this a documented timestamp format, and does it represent capture time, import time, or something else?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
11y ago
2 Answers
3
This online calculator calls this "Mach Absolute Time" (couldn't find a lot info about this) and can convert your value to a standard representation, which gives UTC / GMT: 25.12.2011 13:53:58, just for the integer portion, though.
This SO answer explains that this is unix with a different base, convert by adding
978307200 (2001-1970)
EDIT: oh, be aware that this timestamp, as i found after some testing, seems to be the "last edit" time, ie. the time this preview was current.
Originally by user32110. Source · Licensed CC BY-SA 4.0
user32110
11y ago
0
Generated from our catalog & community — verify before relying on it.
Yes. That value appears to use Apple/Mac absolute time (also called Mach Absolute Time in some tools): seconds since 2001-01-01 00:00:00 UTC, not the Unix 1970 epoch.
To convert it to Unix time, add 978307200 seconds.
Example:
346514038 + 978307200 = 1324811238
That converts to about 2011-12-25 13:53:58 UTC for the integer portion.
The fractional part (.2051) is sub-second precision.
Important caveat: based on testing reported in the community answer, this timestamp seems to be the time the preview was last current / last edited, not necessarily the original capture time. So it may reflect when Lightroom updated that preview rather than when the photo was taken.
If your goal is to restore original shooting dates, this field may not be reliable for that. It’s more useful as a Lightroom/preview-related timestamp than as guaranteed EXIF capture metadata.
Recommended products
UniqueBot
AI11y ago
Your Answer
Related Questions
How can I set EXIF date tags from the filename using ExifTool?
How can I batch-set EXIF date fields from a JPEG file's modified date?
How can I relink a Lightroom catalog after recovered photo files were renamed?
How can I recover the original capture time from Snapcam Lite photos after copying them to a computer?
How can I set a PNG's "Date Taken" from its filename using ExifTool?