Welcome, Guest. Please login or register.
October 22, 2018, 06:04:07 PM


Author Topic: File time & date  (Read 3343 times)

Offline micksulley

  • New Member
  • *
  • Posts: 5
File time & date
« on: August 31, 2016, 09:29:46 AM »
The time and date is set correctly on my camera, but the picture files created are different by 1 hour.  The file date is 1 hour after the actual time the picture was taken.  Metadata is correct.  Why?  As far as I can see there is no daylight saving setting on the camera, and even if there was this would seem to be in the wrong direction.
Any ideas?
Thanks
Mick

Offline AndyCivil

  • Moderator
  • *
  • Posts: 2411
Re: File time & date
« Reply #1 on: August 31, 2016, 04:53:43 PM »
I've observed differences in times particularly when running one computer sometimes on Linux and sometimes on Windows - they seem to treat the clock differently. When you view the date, where are you doing it? On the camera, or on a computer? And what OS is the computer running?

Offline micksulley

  • New Member
  • *
  • Posts: 5
Re: File time & date
« Reply #2 on: September 04, 2016, 04:09:03 AM »
My main os in Linux Mint, and I import pics from the camera using DigiKam.  I am in UK and currently on BST which is GMT + 1.  I have just taken a picture at 10:39 BST, and imported it from the camera, then taken the SD card out and plugged that in.

Imported file data in Digikam
Image Info - Date & Time 2016:09:04 10:39:19
Photo Info
Date & Time (digitized) 2016:09:04 10:39:19
Date & Time (original) 2016:09:04 10:39:19

Imported file info in file manager - file date 04 Sept 2016 10:39:50 BST
file properties in file manager - Date Taken 2016:09:04 10:39:19

Looking at the SD card plugged into the PC
file date  04 Sept 2016 11:39:50 BST (1 hour after it was taken!!)
image properties  - Date Taken 2016:09:04 10:39:19

So it would appear that the camera has its internal time/date set to one hour ahead, but displays the correct time in the setting screen??
As far as I can see there is no setting on the camera for daylight saving, it cannot do it automatically as it does not know where I am and daylight saving settings vary across the world.
I just don't understand what is going on here - any ideas?

Offline AndyCivil

  • Moderator
  • *
  • Posts: 2411
Re: File time & date
« Reply #3 on: September 05, 2016, 08:53:56 AM »
You've stumbled upon a philosophical difference between the way Windows and Linux handle time zones. Windows actually changes the clock for BST and stores the displayed time as the file time. Linux maintains the clock as UTC, and uses a "timezone" file to configure how times are displayed to the user, including times and dates on files. This is because Linux was designed by intellectuals and Windows was thrown together by idiots.

Canon has no adjustment for DST as you say, you are expected to change the clock when BST starts and ends - it follows the Windows philosophy. Therefore, when Linux finds the file date, it assumes that it's UTC and "corrects" it for BST - giving it the wrong time.

I suggest you maintain your camera at UTC. It does mean that if you do work for clients it will seem to them that it has the wrong time on it, but you can explain that you work in UTC and it doesn't have the BST hour shift.

If that's not acceptable, you might be able to fiddle it by changing your computer's clock for BST manually, and editing your timezone file to remove the BST shift. Similar to what Joey did here:
https://joeyh.name/blog/entry/howto_create_your_own_time_zone/

Offline micksulley

  • New Member
  • *
  • Posts: 5
Re: File time & date
« Reply #4 on: September 05, 2016, 03:36:00 PM »
So the camera records the exif data based on 'camera time' and it creates the file with 'camera time', but Linux sees that and assumes it to be UTC and adds 1 hour to display it as BST.

Thanks for your help, it is a bit clearer now.

Who ever thought that daylight saving was a good idea anyway?? It's not as if it actually saves any daylight.
I don't think I will create my own timezone, if I do that I will be tempted to create my own currency and political system as well.  But then again......

Mick