System / Date Setup via Internet at Startup


Forum: Apps
Topic: System / Date Setup via Internet at Startup
started by: kk75

Posted by kk75 on Nov. 03 2007,11:26
Hello,
in the system menu i found this item "Set Date / Time via Internet".

I would like to add this script to the startup script. Where can I find the command
for starting this time update script ?

Regards,
kk75

Posted by Juanito on Nov. 03 2007,11:44
From /home/dsl/.fluxbox/menu:
Quote
...
[exec] (Via Internet Time Server) {sudo /usr/local/bin/gettime.lua}
...

Posted by danielp on Nov. 05 2007,13:19
Just found this thread; interesting!
When you do sudo /usr/local/bin/gettime.lua you get the time back in UTC format. Is there a way to make a script to change the PC's time as well? Where is the timezone saved?

Posted by Zucca on Nov. 05 2007,13:26
< Try this >. ;)
Posted by roberts on Nov. 05 2007,15:34
Quote (danielp @ Nov. 05 2007,05:19)
Just found this thread; interesting!
When you do sudo /usr/local/bin/gettime.lua you get the time back in UTC format. Is there a way to make a script to change the PC's time as well? Where is the timezone saved?

The timezones supported in DSL can be found in /usr/share/zoneinfo
To use local time just boot with the tz boot option set to a supported timezone. For example, I use

tz=US/Pacific

Combing this boot option and the gettime.lua you will have accurate local time set.



Posted by danielp on Nov. 05 2007,19:59
Not sure I understood you well Robert. If I boot with tz=Paris (in my case), then add the line
/usr/local/bin/gettime.lua
in bootlocal.sh I should be able to automatically get the time set on the machine on each boot?

Strangely, it does set the time, but not in the right timezone :(
In my example, it's now 21:00 and it set my time to 15:00, so 6 hours late.

Posted by roberts on Nov. 05 2007,20:34
Try tz=Europe/Paris
Posted by danielp on Nov. 05 2007,20:51
Great, that did it! Thanks (as always)
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.