You are not logged in.
Pages: 1
Hello comunity!
I have a problem with the slitaz clock, it shows me a totaly wrong infromation, 11/09/2008 04:39 AM, with 15 hours and 4 years away from the real date and time...
What can i do to set the proper time?
Greetings.
Offline
# tazpkg get-install ntp
# ntpdate -u fr.pool.ntp.org && hwclock -w -u
Offline
Thank you Bellard! 
Offline
> # tazpkg get-install ntp
> # ntpdate -u fr.pool.ntp.org && hwclock -w -u
We already have busybox with builtin NTP client/server..
Offline
@devl547
OK, so how to you set the clock with "busybox with builtin NTP client/server"?
Offline
My investigation:
[c]# busybox ntp
ntp: applet not found[/c]
In the output of busybox --help I see ntpd:
[c]# busybox ntpd --help
Command line: busybox ntpd --help
BusyBox v1.18.4 (2012-03-14 03:32:25 CET) multi-call binary.
Usage: ntpd [-dnqNwl] [-S PROG] [-p PEER]...
NTP client/server
Options:
-d Verbose
-n Do not daemonize
-q Quit after clock is set
-N Run at high priority
-w Do not set time (only query peers), implies -n
-l Run as server on port 123
-S PROG Run PROG after stepping time, stratum change, and every 11 mins
-p PEER Obtain time from PEER (may be repeated)[/c]
See ya!
+++
[c]root@slitaz:/home/tux# busybox ntpd -dnqp fr.pool.ntp.org
ntpd: sent query to 88.191.88.195
ntpd: reply from 88.191.88.195: reach 0x01 offset 0.066334 delay 0.073731 ↵
status 0x24 strat 2 refid 0x14025dc0 rootdelay 0.001678
ntpd: sent query to 88.191.88.195
ntpd: reply from 88.191.88.195: reach 0x03 offset 0.067031 delay 0.074315 ↵
status 0x24 strat 2 refid 0x14025dc0 rootdelay 0.001678
ntpd: sent query to 88.191.88.195
ntpd: reply from 88.191.88.195: reach 0x07 offset 0.066614 delay 0.074110 ↵
status 0x24 strat 2 refid 0x14025dc0 rootdelay 0.001678
ntpd: sent query to 88.191.88.195
ntpd: reply from 88.191.88.195: reach 0x0f offset 0.066482 delay 0.072698 ↵
status 0x24 strat 2 refid 0x14025dc0 rootdelay 0.001678
ntpd: sent query to 88.191.88.195
ntpd: reply from 88.191.88.195: reach 0x1f offset 0.065155 delay 0.078656 ↵
status 0x24 strat 2 refid 0x14025dc0 rootdelay 0.001678
root@slitaz:/home/tux#[/c]
………
Offline
@Aleksej
thanks, one question
root@slitaz:/home/tux# busybox ntpd -dnqp fr.pool.ntp.org
tux@slitaz:~$ su
Password:
root@slitaz:/home/tux# /home/tux# busybox ntpd -dnqp fr.pool.ntp.org
sh: /home/tux#: not found
root@slitaz:/home/tux#
#1 - unsure what command I use and
#2 - where to find the local npt to replace your "fr.pool.ntp.org"
Offline
Oh man! 
Looks like you're new to Linux.
When you see next command:
[c]root@slitaz:/home/tux# busybox ntpd -dnqp fr.pool.ntp.org[/c]
you want to understand that root@slitaz:/home/tux# is command line prompt, and busybox ntpd -dnqp fr.pool.ntp.org is actually a command. I just copy my terminal to my post. My prompt includes:
[*]current user name: root
[*]symbol @
[*]machine name: slitaz
[*]symbol :
[*]current path: /home/tux
[*]symbol # indicates root user, or symbol $ indicates unprevileged user
For choosing your nearest ntp server go here: http://support.ntp.org/bin/view/Servers/NTPPoolServers
Offline
yep - root@slitaz:/home/tux# busybox ntpd -dnqp fr.pool.ntp.org - stupid mistake
thanks for the step-by-step
Offline
busybox ntpd -dnqp 0.north-america.pool.ntp.org
still unable to set correct date/time on my system, thoughts?
Offline
Copy & paste your terminal here (Sakura terminal → select text (by hold left-mouse-nutton & drag over text, then release left-mouse-button) → switch to forum → press middle-mouse-button in text field (to paste selected text). Or attach screenshot.
I have not any problems with your command.
By the way, NTPD fetches date/time from high-class precision time servers and set your system clocks (system clock is not hardware clock). Do you properly set your timezone? (SliTaz menu → Settings → Time Zone configuration)
Offline
That's why Bellard suggested [c]hwclock -w -u[/c] because it sets the hardware clock with the system clock's time.
Offline
Yes, there is two steps in Bellard's code:
[*]set system clocks from internet
[*]set hardware clocks from system clocks.
Yes, I describe only first step, while second step is optional and unchanged.
So, here combined command to set system clocks and hardware clocks from internet:
[c]busybox ntpd -dnqp north-america.pool.ntp.org && hwclock -w -u[/c]
Offline
thanks all
off by 7+ hours, see attached screenshot
[attachment=17714,736]
Offline
... did you change the timezone to the right one? Go to Applications--> Preferences--> Time Zone Configuration
You may need to install glibc-locale to get all the possible timezones.
Offline
@Trixar_za; thx, yes set timezone before executing @Aleksej's suggestion
will fall back to @Bellard suggestion and close out this post if it works
interesting, if you follow this post, it is one big circle
@ilgrandere has the same problem as mine
@Bellard suggests the fix you recommend
@devl547 suggests not necessary to execute @Bellard suggestion
Offline
@Imart
Your i.p. location indicates Plano,Texas which is on CentralDaylightTime (CDT)
Applications/Preferences/Time Zone configuration
America/Mexico_City
OK
Close X session : exit
Login
Time should be correct
Offline
Did you restart the computer after setting the timezone?
Offline
@mojo
whew, can the magic you worked getting my timezone tell you my blood type too? ;-)
here is exactly what it required to set the proper date/time
#1 per @mojo
Applications/Preferences/Time Zone configuration, set to timezone, OK
#2 per @Bellard
tazpkg get-install ntp
ntpdate -u north-america.pool.ntp.org && hwclock -w -u
#3 per @mojo
Close X session : exit
Login
Time is correct
Offline
CORRECTION:
after rebooting the system and, starting with a clean slate, here is exactly what is required to set the proper date/time
#1 per @mojo
Applications/Preferences/Time Zone configuration, set to timezone, OK
#2 per @Bellard & @Aleksej
busybox ntpd -dnqp north-america.pool.ntp.org && hwclock -w -u
#3 per @mojo
Close X session (logout button) : exit
Login
Time is correct
Offline
Pages: 1
[ Generated in 0.022 seconds, 7 queries executed - Memory usage: 1.56 MiB (Peak: 1.77 MiB) ]