[clug] date issue

Randall Crook rcrook at vtown.com.au
Sun Oct 2 01:35:34 MDT 2011


On a side issue,

You do realize there was no 2:06 am local time am this morning? ;)
</pedant>

Randall. 

On 2/10/11 3:01 PM, 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
> sentry
> 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?
> Is it a FAT mount option mismatch?
>
> cheers
>



More information about the linux mailing list