[Server-devel] timestamps on backups

Tom Mitchell mitch at niftyegg.com
Wed Sep 16 18:05:28 EDT 2009


On Wed, Sep 16, 2009 at 5:37 AM, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> On Wed, Sep 16, 2009 at 2:28 PM, Hamilton Chua <hamilton.chua at gmail.com> wrote:
>> I'm not sure if anybody has noticed this yet but after doing a backup,
>> it seems the datestamps on the backup page are wrong.
>
> We might need more detail than that if we're to understand the situation :-)
>
>> Is there something about time zones and time synchronization that we
>> need to be aware of with regards to backups.
>
> Yes, the utc time on all machines should make sense. So do
>
>  date --utc
>
> on XS and on the laptops involved to make sure all players are in the
> same decade. This has been tested with machines on different TZs so it
> should work. As long as utc agrees across machines.

> --
>  martin.langhoff at gmail.com
> http://lists.laptop.org/listinfo/server-devel

The two numbers 4 hours and 40 years are almost telling.

Linux keeps time as seconds from midnight January 1, 1970 12:00:00 GMT.
Today GMT (Greenwich Mean Time) has been replaced by UTS (Coordinated
Universal Time)
which is GMT done "better" with atomic clocks.

Since you are using XS on 0.6d5 and Sugar on a Stick the system gets the
initial time of day (date) from the local hardware clock.   A unix/Linux system
default sets the local hardware clock to UTS while windows sets it to
local time.
Depending on daylight savings time in (say) Oklahoma four hours looks
like a Windows
system setting the hardware time of day.  Since Linux can be configured to play
nice with windows and set the hardware clock to local time windows is not
always the issue in possiblly confusing the offset from GMT/UTS.

The 40 years is very close to the beginnig of unix time (zero seconds) and
can be seen on a confused local time of day clock.

NTP (network time protocol) tools can be used to set the time of
day on a network connected system to the correct UTS time.

Local time is computed based on UTS and an offset time zone.

Since all binary time stamps are UTS different users can set different
timezone values in their environment and the system will do the 'right' thing.

See:
  date
  date --uts
  date -u
  (export TZ="Europe/Paris";date;date-u)
#
 touch /tmp/now
 stat /tmp/now
 (export TZ="Europe/Paris"; stat now)











-- 
        T o m   M i t c h e l l
        mitch-at-niftyegg-dot-com


More information about the Server-devel mailing list