How to update capture date & time in PlayStation screenshots
Update screenshot timestamps in bulk to avoid manually editing metadata in your photo catalog.
If you’re a metadata nerd like me, you might be frustrated when your photo catalog doesn’t reflect the accurate time when your images were taken, instead falling back to the date the file itself was modified. In many cases this will be fine, but if you’re moving the image file from device to device, the original timestamp can get lost in the shuffle.
Luckily, Sony preserves the timestamp in the filename. Once the image is imported into a Lightroom catalog for instance, you can reference the filename when modifying the capture date/time. This is pretty tedious and time-consuming though, and if you have a date-based folder structure it won’t update after editing the time.
I built a command-line utility for preparing photos to add to this site — built around the amazing Sharp library — that I also use for automating JPG conversions and now, correcting the capture date before I import into Lightroom.
Unfortunately, the digits used in the filename datestamp aren’t in a format the Date constructor can parse, so I had to manually turn it into a string the metadata fields expect.
The first eight digits make up the date, four for the year, two for the month, and two for the day. The last six digits are the hour, minute, and second of the time. Each part of the date and time are separated by a colon and are joined by a space.
Now that the date and time are properly formatted, we can add them to the appropriate metadata fields. Image metadata is an esoteric topic bordering on the arcane, but working backwards from an image I updated manually I found the fields I needed. This is where
exiftool can come in handy, but since I’m already converting the image to JPG with Sharp, I use the
withMetadata() method to write the new date EXIF tags.
exiftool to examine an image I updated manually showed the modified date in a couple other tags, but these ones were sufficient for Lightroom to detect the correct date when importing.
Now once I update my image files, I can import them into Lightroom and the capture date is shown accurately!