LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 08-25-2018, 08:37 AM   #1
mike acker
Member
 
Registered: Feb 2014
Location: Michigan
Distribution: Debian 10
Posts: 199

Rep: Reputation: Disabled
Photo Library Question re Date and Time


Q: Do we have a utility someplace that can be used to correct the date and time for the images in a given folder?

What I'd like to do is: read each .JPG file, and obtain the Camera Value for Date and Time;

Then use the touch utility to set the date/time on that image = to the value obtained from the actual .jpeg

It's fairly simple to correct the date only when all of the .jpeg in the folder were made on the same day and the date shows on the name of the folder -- or one or more images were not modified.

just
Code:
touch *.JPG --date="2018-08-13 1300"
but this sets all the images as having been taken at 1300 hrs. Close -- but -- can we get it right ?

After you have use a program e.g. Shotwell -- to apply ratings or tags to images -- the date/time on the images will be changed to the date/time of modification.

this, of course because a program like Shotwell rewrites the .jpeg files in order to incorporate new data into the IPTC entries in the .jpeg image file.

Last edited by mike acker; 08-25-2018 at 08:38 AM.
 
Old 08-25-2018, 09:11 AM   #2
mike acker
Member
 
Registered: Feb 2014
Location: Michigan
Distribution: Debian 10
Posts: 199

Original Poster
Rep: Reputation: Disabled
First, install jhead utility

Command to fix time is

Code:
jhead -ft *.JPG
 
1 members found this post helpful.
Old 08-26-2018, 08:32 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
who'd've thought there's a utility for that!
i was going to suggest exiftool and a little scripting...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ls -l Output Date/Time Format Question Abunai Linux - General 8 05-22-2011 05:48 AM
Question about Date & Time LuvsHerSoldier Linux - Newbie 2 06-26-2010 11:18 PM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 10:17 AM
Question about getting the date/time information from a file shazam75 Linux - General 1 10-31-2004 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration