Files

45 lines
4.5 KiB
Plaintext
Raw Permalink Normal View History

Episode: 546
Title: HPR0546: Shot of Hack - Changing the time offset of a series of photos
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0546/hpr0546.mp3
Transcribed: 2025-10-07 22:50:55
---
My name is Ken Fallon. I'm changing the time-off set of a series of photos. You're listening to a shot of hack.
Okay, this is a problem. You got a series of photos where the time is incorrect, but the time of the series of photos in relation to each other is correct.
This has happened to me in the past where I've changed the battery on the camera and it defaulted to the first of January.
The first photo I took was one minute past. One minute past midnight, the second was five minutes past midnight, so the time between photos is correct, but the time-off set is incorrect.
I've also had this where I've had a big family event where people have come in with different cameras and everybody had slightly different times.
So as your browsing through the photos by time, you jump from the reception to the church back to the photos outside, back to the church, back to the reception.
So for each of the cameras you need to synchronize the time in relation to each other. It also happens when you go from one time zone to the next and people learn different times zones and the cameras are out by an hour.
I've also had it where I wanted to synchronize photos that I've taken along a GPS trail so that GPS timestamps for a particular coordinate would be more accurate than what's on the camera.
So there are three instances where I've needed to do this.
Now you can do this using the GUI, something like the GIMP supports editing metadata.
Under a KDE, if you open up GNUVU and go to plug-ins images metadata, you can edit the EXIF data.
The problem is that this gets tiresome after a few images and also you have to then correct each of the times on its manual process.
So all I want to do is for a range of photos, I want to move them forward an hour or back an hour in the case of time zone changes.
So I've been looking for a tool to do that and the answer of course as always is EXIV2, which is the image metadata manipulation tool.
There are a few different standards that supports EXIF, IPTC and XMP, my camera only supports EXIF so that's all I'm interested in.
And if you do EXIV2, space and asterisk.jpeg, it'll dump out all the metadata that's stored in your photos.
And the one that we're interested in is the one that's called Image timestamp, which in the example is set to 2008, 12,07, at the time of 15, 12,59.
Now, so you've got a series of photos and you want to just all of them up and up or down.
The trick is to find one photo where you know that the time is correct.
A typical GPS trick is that you take a photograph of the GPS unit as you leave or as you come back that way you have a known time that's correct with the GPS.
Another thing you can do is just look for a clock in on the wall or look for an event that was correct.
So in the case of a wedding, for instance, when the case the bride, for instance, you pick one camera that you know was a good time source and then you just everybody else's camera to that.
EXIV2 has various different options for adjusting date and time and I'll just go through them here.
So in my case, I needed to adjust the date forward by six months and four days, so six months and four days.
And then I needed to change the time itself back by seven hours.
The command that I used to do that was EXIV2, space minus capital O, space six, space minus capital D, space four, space minus A lowercase, space minus seven, space asterix.JPEG.
Now, going through each of those commands individually, the dash A is the time adjustment, which in my case was minus seven.
If you just put in one, it adds one hour. If you put in one, double colon, zero, one, it adds an hour in a minute. If you put in minus zero, colon, zero, zero, colon, 30.
It was subtract 30 seconds.
I didn't need to use the dash Y, capital Y parameters, which would be number of years, positive or negative.
O, I think it's all might be a zero, but how do you copy and paste it, your friend?
The dash O is from month and the dash capital D is for day.
And then when we run the command, we see that the timestamp has now changed to 2009, 06, 11, 08, 12, 59.
Now, that's it. Remember that this is the end of the conversation.
And if you want to give feedback to the show, you can record an episode and send us to admin at hackerpublicradio.org.
Your other alternative is to write your feedback in a posted note and attach it to the windscreen of Daviets' car when he's recording this next show.
Thank you very much.