[clug] date issue
scott.ferguson.clug at gmail.com
Sat Oct 1 23:06:12 MDT 2011
On 02/10/11 15:01, Eyal Lebedinsky wrote:
> No, not that kind of date...
> I have my cameras always set to UTC. This way I do not need to adjust
> the date
> whenever I travel (which I usually do midway through the trip).
> The GPS tracker I use keeps records in UTC (naturally) so this also make
> it easy to geotag the pictures.
> I have a script that copies files from the camera, and it uses a local
> to mark the last file that was already copied. This way only new files
> are copied.
> Files go into different directories so this is not a simple task to
> actually check
> that a picture was already copied.
> When a new picture is found I set the sentry like this
> cp -p camera.jpg disk.jpg
> touch -r disk.jpg sentry
> Today, getting home after a nice walk, I got this errors from my script:
> Sun Oct 2 14:18:57 EST 2011 getpics: fetching 'img_9708.jpg'
> Sun Oct 2 14:18:58 EST 2011 getpics: fetching 'img_9709.jpg'
> Sun Oct 2 14:18:58 EST 2011 getpics: fetching 'img_9710.jpg'
> Sun Oct 2 14:18:59 EST 2011 getpics: fetching 'img_9711.jpg'
> touch: invalid date format `2011-10-02 02:06:54'
> Sun Oct 2 14:18:59 EST 2011 getpics: fetching 'img_9712.jpg'
> touch: invalid date format `2011-10-02 02:07:02'
> Sun Oct 2 14:19:00 EST 2011 getpics: fetching 'img_9713.jpg'
> touch: invalid date format `2011-10-02 02:07:03'
> Sun Oct 2 14:19:00 EST 2011 getpics: fetching 'img_9714.jpg'
> touch: invalid date format `2011-10-02 02:08:08'
> Sun Oct 2 14:19:01 EST 2011 getpics: fetching 'img_9715.jpg'
> touch: invalid date format `2011-10-02 02:08:16'
> Sun Oct 2 14:19:01 EST 2011 getpics: fetching 'img_9716.jpg'
> touch: invalid date format `2011-10-02 02:08:21'
> The issue is clear. there was no Oct 2 02:00 due to daylight saving.
> If I list the relevant files I see a date of 03:06:54 on both the
> camera and the disk copy. Why do I get this error? I thought that
> the timestamp is always UTC anyway.
> Is this a FAT issue?
> Does it record file timestamps as local tz?
Yes - unless you set your localtime zone as Greenwich...
$ cat /etc/timezone
on a Debian based distro, uses:-
Depends on how you have system time setup - clearly you have your OS set
to use the local time zone (or it wouldn't know about daylight saving)
> Is it a FAT mount option mismatch?
Do you often take pictures at 2am? ;-p
More information about the linux