Results 1 to 4 of 4

Thread: UST Time vs. Local Time

  1. #1
    Join Date
    Dec 2008
    Location
    Ile-Aux-Noix, QC
    Posts
    57

    Default UST Time vs. Local Time

    Since I started using Linux in 2000, I've been running all my systems with the BIOS clock set to UST time and just let the OS handle the time zone difference. I remember reading that it was the recommended way to have it set, although I also remembering not understanding why. It's just the way I've done it for years and years.

    I was just playing with my new digital camera, and I noticed that when I read the SDHC card in opensuse, the timestamps are all wrong. My camera has the proper date, time and time zone set. The EXIF data in the images shows the right time. But the timestamp of the file itself is off by 5 hours (I live in EST, so -5 from UST). When I read the SDHC card in Windows, the timestamps are right. But the timestamp of a file I created in opensuse is off by 5 hours.

    For the first time ever, I set my BIOS clock to current local time and do not let the OS manage time zones. This seems to fix all my timestamp issues.

    My question is, what exactly is the benefit of having my BIOS clock set to UST and letting Linux manage the timezone differences? It just seems to break compatibility with every other OS out there when it comes to filesystem dates and times.
    Frank Gore
    - '78 Trans Am, Pontiac 400... oops, wrong forum!
    - 2008 Kona Hoss, custom built from scratch... oops, wrong forum again!
    ...bah! Forget it! Who needs a sig anyways?

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: UST Time vs. Local Time

    UST? You mean UTC I think.

    Generally it's optimal to set the hardware clock to UTC. However on dual boot systems, brain-damaged Windows works in local time and so you have to set the hardware clock to localtime.

    When you do that, there is one disadvantage. Every spring and autumn/fall, the hardware clock must be adjusted by one hour when daylight savings time kicks in or goes away. Normally Windows does this while it's running, or the next time it boots. However Linux doesn't know this it should adjust the hardware clock unless there it is keeping sync via NTP and there is a command to save the time to the hardware at shutdown, or by a periodic cron checking.

    The reason your JPEG timestamps are wrong are because like Windows, the camera is working on local time. There are cameras that have timezone settings and even a DST switch.

    To fix the timestamps of your pictures, there are various programs that can do this. I use one called jhead. I don't know if programs like digikam can fix the timestamps. Remember it's not just the file timestamp but also the EXIF timestamps that have to be fixed, if you wish to work in UTC.

    Another workaround is to set your camera time to UTC, but then the camera might have a feature that watermarks the picture with the time and then the watermark would look wrong.

    There is no good solution without a smarter camera.

  3. #3
    Join Date
    Dec 2008
    Location
    Ile-Aux-Noix, QC
    Posts
    57

    Default Re: UST Time vs. Local Time

    Sorry yes, I meant UTC.

    I don't dual-boot, I had to dust off VirtualBox to confirm that the timestamps were appearing correctly in Windows. So it's really just the timestamps on the SDHC card that are annoying me. It's only starting to annoy me now because I've been taking so many pictures with this new camera. I would find it annoying to have to edit the timestamp of every batch of pictures everytime I transfer them to my server.

    I always figured the timestamp on filesystems was just stored as "00:00" based on the operating system's clock, with no regard for timezones. But if that's not the case, how is it stored? In UNIX time? (seconds since such and such date, 1970) Even on FAT32 filesystems?

    I can confirm that the time stored in the EXIF _is_ stored just as "00:00" (it's just a text field), so it shows up properly no matter where I'm reading the card.

    In any case, I'll leave my system set to local time for now. It's less annoying. I'll see how the EDT change is dealt with in March and then decide if I'll keep it this way.
    Frank Gore
    - '78 Trans Am, Pontiac 400... oops, wrong forum!
    - 2008 Kona Hoss, custom built from scratch... oops, wrong forum again!
    ...bah! Forget it! Who needs a sig anyways?

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: UST Time vs. Local Time

    Each filesystem has it's own representation of timestamps. Unix filesystems generally store the time past the epoch at the prime meridian. DOS, because of its origins in CP/M, has no concept that you might want a global timestamp and stores in localtime. Linux tries to make as much sense of DOS timestamps as it can, but you will get the wrong time if you look at a DOS file at another meridian.

    Incidentally I've been scanning in old magazine articles of interest. Simply because it appealed to my sense of order, I decided to stamp a time of when the article was published, e.g. one from June 1985 I would timestamp midnight June 1, 1985. Unfortunately I had one article published in 1969 and the best I could do was give it a date of midnight Jan 1, 1970.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •