[Sugar-devel] setting date and time (was: re: journal sort options)

James Cameron quozl at laptop.org
Wed Aug 18 21:23:33 EDT 2010


On Thu, Aug 19, 2010 at 12:42:47PM +1200, Tabitha Roder wrote:
> How do I set the time please? I have been meaning to ask that for
> ages! It would be good if this was in my settings / control panel so
> the user can check their time and date.

The short answer; switch to GNOME and set it there.

Sugar does not provide a way to set the date and time, as far as I can
see.  Other desktop systems provide that.  GNOME provides a right-click
option on the clock (top right of screen) called "Adjust Date & Time"
and this seems to work fine.

Laptops in deployments with a school server set the date and time
periodically, I've heard.  I've not tested this.

You can use the Terminal activity to gain access the underlying
operating system and set the time there.  There are several tools
available.  How easily this is done depends on what other packages may
be installed on the operating system.  As I don't know which operating
system build you are asking about, I'll assume the OLPC builds.

1.  one tool is rdate, which is on the OLPC builds, but that requires a
server nearby that runs the time service on port 37.  The command is
"rdate -s SERVER", where SERVER is the IP address or host name of the
server.

2.  another tool is ntpdate, but it is not on the OLPC builds that I
test.  I install it on units that I want to remain better synchronised.
The command is "ntpdate pool.ntp.org", although there are people who
would like you to consider carefully whether you deploy this over
thousands or millions of laptops.  There would be a more appropriate
name than pool.ntp.org, so that the distributed load can be identified.

3.  yet another tool is the Linux date command,  but the format of
the input is archaic.  I do not recommend it.

Once you set the time on the operating system kernel, the next
controlled shutdown should store it into the Real Time Clock (RTC) of
an XO or normal computer.  You can encourage this to happen earlier
using a command "hwclock --systohc".

On XO hardware, with security disabled, you can set the time using
OpenFirmware:

http://wiki.laptop.org/go/Fix_Clock#If_the_screen_turns_on_but_you_cannot_enter_Linux

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list