This is the old SliTaz forum - Please use the main forum.slitaz.org

hwclock and slitaz handbook
  • erniaernia October 2010
    Is the slitaz handbook http://www.slitaz.org/en/doc/handbook/system-admin.html wrong in the hwclock section?
    it says

    Syncronize the system clock to the hardware clock ( --utc = universal time, -l = local time):
    # hwclock -w --utc
    Syncronize the hardware clock to the system clock:
    # hwclock -s --utc


    hwclock --help says

    Options:
    -r Show hardware clock time
    -s Set system time from hardware clock
    -w Set hardware clock to system time
    -u Hardware clock is in UTC
    -l Hardware clock is in local time
    -f FILE Use specified device (e.g. /dev/rtc2)

    Aren't the -w and -s options inverted? Am i misunderstanding?
    Should the doc be fixed? If yes am i allowed to do that?
  • seawolfseawolf October 2010
    I think it should be the other way round, yes:

    seawolf@sammy:~ $ hwclock -r
    Sat Oct 16 09:42:59 2010 0.000000 seconds

    seawolf@sammy:~ $ date
    Sat Oct 16 10:43:02 BST 2010

    seawolf@sammy:~ $ sudo hwclock -s
    seawolf@sammy:~ $ date
    Sat Oct 16 09:43:20 BST 2010

    seawolf@sammy:~ $ sudo date +%T -s "10:46:00"
    seawolf@sammy:~ $ date
    Sat Oct 16 09:46:03 BST 2010


    The docs site is at http://doc.slitaz.org/en:handbook:systemutils#system-time which is slightly different but still has this issue. You can go ahead and change it; everything has a history so we can just revert it if need be later on.

    Perhaps we should change it to say something like:
    -s syncs both to the hardware clock
    -w syncs both to the system clock

    Only mentioning the one that is considered correct, to avoid confusion.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social