UTC problem on Canon 7D

Chat about Linux in general
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Locked
mike acker
Level 7
Level 7
Posts: 1517
Joined: Wed Jul 31, 2013 6:29 pm
Location: Kalamazoo, MI

UTC problem on Canon 7D

Post by mike acker »

how can I do a

Code: Select all

ls --full-time 
directory against a tethered camera --
which mounts as gphoto2 in /usb ?

the imaged from the 7D come across with 5 hours deducted from the time stamp -- as though Linux thinks the time stamps are UTC and attempts to correct them to EST

if the files are copied off the SD chip the time stamps are OK

Code: Select all

-rw-r--r-- 1 mike mike 12238914 2015-11-10 15:47:54.000000000 -0500 VM2A4204 image copied from 7D using SD Chip.JPG
-rw-r--r-- 1 mike mike 12238914 2015-11-10 10:47:54.000000000 -0500 VM2A4204 image copied from 7D using tether.JPG
i can list the data -- but only AFTER it is transferred to my local hard drive . I think the Canon 7D is neglegting to tell Linux that the time stamps are EST ( = UTC - 5 ) .
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
¡Viva la Resistencia!
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: UTC problem on Canon 7D

Post by Flemur »

Do you want to list the files with dates, or do you ultimately want to have the correct date on the files on your computer?

If the latter and you don't get a better answer, you might try "touch", and use it to either add 5 hours back onto the date, or use the date from the EXIF data with "exiftool".

https://www.google.com/search?q=linux+s ... +from+exif
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
mike acker
Level 7
Level 7
Posts: 1517
Joined: Wed Jul 31, 2013 6:29 pm
Location: Kalamazoo, MI

Re: UTC problem on Canon 7D

Post by mike acker »

Flemur wrote:Do you want to list the files with dates, or do you ultimately want to have the correct date on the files on your computer?

If the latter and you don't get a better answer, you might try "touch", and use it to either add 5 hours back onto the date, or use the date from the EXIF data with "exiftool". { snip }
there are various circumventions, but, being and old programmer, it bugs me that this has not been programmed properly

the easy, quick way is to not use the tether cable and simply read the SD chip

i did write a script to fix files,--

Code: Select all

#!/bin/sh
#
# reset jpeg file by n hours
#
echo "correct *.JPG time stamps.   Enter hours, e.g. +4 for UTC to EDT"
read hrs_adj
echo "Adjustment will be " $hrs_adj " hours. "

read -p "Enter name of directory to be corrected" directory_name

echo "Directory name: " $directory_name

 for file_nm in "$directory_name"/*.JPG
  do
    echo "File name to touch: " "$file_nm"  
    # to increment time stamp relative to subject file
    touch -r "$file_nm" -d " $hrs_adj hour " "$file_nm"
  done
  
  echo "Corrected Directory:"
  ls -l "$directory_name"

echo "done"
I'm using LMDE/2 -- and my copy of DarkTable doesn't work right . evidently there are updates but these have to be pulled in from back-packages or something like that -- a tricky procedure

I wonder why we don't have our packages updated better . I wonder what it takes to become a package manager

on LibreOffice for example -- that one is re-distributed just as a tarball containing .deb packages -- which makes it easy to remove the existing program and install the new one . i wish DarkTable would make a .deb update available
¡Viva la Resistencia!
Locked

Return to “Chat about Linux”