Tiny Core Base > TCB Tips & Tricks

[trick] get the time for your clock

(1/6) > >>

ferran:
Hello / Hi everybody:

If your TC clock is broken usually because the hardware clock's battery is dead (like to me), I suggest you to use this command

ntpd -q -p (here the pool.ntp.org server)

NOTE: You must be connected to internet

Before let's take a look to ntp servers in its web:

https://support.ntp.org/bin/view/Servers/NTPPoolServers

Search the most fine hostname time zone browsing first by continent and after by your nation state or country. In my case i found 0.es.pool.ntp.org, so


--- Code: ---ntpd -q -p 0.es.pool.ntp.org

--- End code ---

Suddenly my desktop clock changed the time!. I hope it works to you as fine as to me.

jazzbiker:
Hi, ferran!

Great trick! The right time for the running system is one of the cornerstones. Not trying to underscore Your efforts I propose to look at /usr/bin/getTime.sh script. In general there are a lot of interesting things inside TinyCore. And there is wiki on the project site, worth digging into.

Regards!

ferran:
Thanks!  :)

I saw this script but not works to me (surely because it imports from /etc/sysconfig/ntpserver the generic server "pool.ntp.org". It lefts to be more specific with the time-zone)

jazzbiker:
Hi, ferran!

Interesting that ntpd doesn't work for You with pool.ntp.org. They must find appropriate local time server with the help of DNS. Such fail means, that for some reason they can't find You correctly. Does getTime.sh fails always, or sometimes it sets the time? Maybe try to play with /etc/ntpd.conf? I mean the proposed content

--- Code: ---server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org

--- End code ---

I never had problems with time setting, so I can not check this issue and help You with testing. Probably to emulate such problems i will need to brake my DNS.

ferran:
Very good !. In this moments i can't to test it, but i will tell you something very soon.

Navigation

[0] Message Index

[#] Next page

Go to full version