Re: Date/Time setting

From: Fritz Whittington (f.whittington_at_att.net)
Date: 03/02/05

  • Next message: Thomas Cameron: "Fedora docs are here (was Re: Website info request)"
    Date: Wed, 02 Mar 2005 14:40:19 -0600
    To: alan@meta.com.au, For users of Fedora Core releases <fedora-list@redhat.com>
    
    
    
    

    On or about 2005-03-02 06:14, Alan McDonald whipped out a trusty #2
    pencil and scribbled:

    >I synchronise some files across an ftp connection. The files comes from a
    >computer with the current date/time set, and my PC is also set with correct
    >time (both clock and hwclock return the correct time). But the files which
    >are writtin into the ftp directory are 13 hours ascew.. How can I correct
    >this? Where is the magic setting for making files writen to disk obey the
    >curret clock?
    >thanks
    >Alan
    >
    >
    I'm presuming that this involves moving files from a Windows machine to
    Linux, or vv. Both Windows and Linux use UTC for timestamps. The
    difference is, in Windows you set the hardware clock to your local time,
    tell it which timezone you're in, and it converts to UTC when stamping
    file times. Likewise, it converts timestamps back to local time for
    DISPLAY purposes when you list the directory.

    Linux/Unix do it the other way. The hardware clock is usually set to
    UTC, you tell it what time zone you're in, and the DISPLAY of times will
    be in local, but timestamps on files will be in UTC.

    As a convenience to those who have one machine with a dual-boot of
    Windows/Linux, most distros allow you to declare that the hardware clock
    is actually not UTC, but local. Then when Linux boots, it reads the
    hardware clock, applies the TZ correction, then sets the system clock to
    UTC. If you tell Linux the hardware clock is UTC, then it doesn't apply
    the correction on boot, just sets the system clock to the hardware
    clock, and goes on as usual.

    Windows of course, has no facility to be told that the hardware clock is
    on UTC, and to correct for local time zone on booting. So for Windows
    you must set local time on the hardware clock.

    Another problem is that you can have your Windows time zone set
    incorrectly, and someone has set the hardware clock to compensate. So
    if I in the US Central TZ set my Windows system to the Greenwich time
    zone, then fiddle with the clock setting so that the time "looks
    correct", then Windows will think it does not need to apply any
    correction to get UTC, but all it's timestamps will then be off by 6
    hours. (A file created at 8:00 am local time would actually be stamped
    as 0800 UTC, when it really should be stamped as 0200 UTC.)

    Similar things of course can happen in Linux, in the opposite direction,
    if you don't have your TZ data set correctly and just force the clock to
    look like correct local time.

    -- 
    Fritz Whittington
    It is the duty of every citizen according to his best capacities to give validity to his convictions in political affairs. (Albert Einstein, 'Treasury for the Free World,' 1946)
    
    

    
    

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    


  • Next message: Thomas Cameron: "Fedora docs are here (was Re: Website info request)"

    Relevant Pages

    • Re: Daylight Savings Time - How to Set?
      ... I'd never heard of UTC. ... My hardware clock, IIRC, is set to Pacific Time. ... so I need to change Windows to this "UTC" thing? ... should show local time with all its foibles. ...
      (alt.os.linux.suse)
    • Re: Clock/Time issues
      ... Does this mean that I cant use the UTC option? ... You can set Linux to expect the hardware clock to contain local time ... In Windows, each user can set the update flag individually. ...
      (Fedora)
    • Re: Does Fedora mess up the clock for Windows?
      ... I have a dual boot system with FC5 and Windows XP. ... Fedora does use local time - at ... hwclock will assume the hardware clock is set to local ...
      (Fedora)
    • Re: Incorrect system time
      ... | The hardware clock should always be set to UTC. ... | dual-booting Windows, since Windows runs with local time in the hardware ... Alternatively you can simply let Windows be wrong and use UTC rather ...
      (Debian-User)
    • Re: FYI: /etc/localtime and changing to summer time
      ... > If I remember what happened, on a dual boot system (in my case Windows ... The hardware clock is local time. ... so you had better not adjust the hardware clock when booting. ...
      (Fedora)