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

James Cameron quozl at laptop.org
Thu Aug 19 19:30:44 EDT 2010


On Thu, Aug 19, 2010 at 11:01:37PM +1200, Tom Parker wrote:
> On Thu, 2010-08-19 at 11:23 +1000, James Cameron wrote:
> 
> > 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.
> 
> I tried rdate to the school server, but it wasn't listening.

To fix:

1.  install the xinetd package, if it is not yet installed,

	yum install xinetd

(I've no idea if the school server has xinetd already installed, but
even if it has the above should complete.)

2.  edit the file /etc/xinetd.d/time-stream and change the disable = yes
to disable = no,

3.  start the xinetd service,

	service xinetd start

or if it was already running restart it,

	service xinetd restart

(I'm not sure it needs restarting, I've not researched this point, but
it does work for me on an XO after restarting),

4.  test with rdate to localhost,

	rdate localhost

(here it just tests access, doesn't set clock, since -s was not used),

5.  run "rdate -s SERVER" on the laptops.

> Our deployment was not connected to the internet so I didn't try to
> work out how the rdate server works and whether it was installed but
> not enabled.

I suggest you test things while you have internet access before you go
to where you do not.

> > 3.  yet another tool is the Linux date command,  but the format of
> > the input is archaic.  I do not recommend it.
> 
> Not only is it archaic, it is undocumented :(

Not so, it is certainly documented, just that the format is strange.
You can find the documentation in the manual page for the date command,
and in the info page.

	man date
	info date

The format of the input is [MMDDhhmm[[CC]YY][.ss]] where the square
brackets indicate optional components.

The info page describes each field value, MM = month, and so on.

> > On XO hardware, with security disabled, you can set the time using
> > OpenFirmware:
> 
> It would be nice if the help screen on the open firmware actually
> documented all the commands available, rather than just some of them.

I'm an OpenFirmware release engineer.  There are too many commands to
document them fully within the scope of the firmware itself, since the
documentation could easily exceed the available space for the firmware.

However, there is a possibility of adding some additional text, but to
do this properly I need to know from you exactly *what* commands you
were looking for.

Also, when do you plan to upgrade the firmware version so that you have
this documentation available?

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


More information about the Sugar-devel mailing list