Tiny Core Linux
Tiny Core Base => TCB Tips & Tricks => Topic started by: halma on September 22, 2020, 07:55:28 AM
-
Hi,
if you wanna set or sync the correct localtime on tinycorelinux from command line without additional packages you can use this command:
my date before syncing from my dsl-router
date
Tue Sep 22 14:46:47 CEST 2020
syncing the correct localtime:
sudo busybox date -s "$(wget -qSO- INSERT-YOUR-DSL-ROUTER-IP-HERE 2>&1 | grep '^ Date:' | cut -d' ' -f 5-)" -D "%d %b %Y %T %Z"
Tue Sep 22 16:49:10 CEST 2020
after syncing command
date
Tue Sep 22 16:49:12 CEST 2020
-
Hi halma
Very clever.
-
This was just recently discussed on the bb ml. Busybox httpd (by default) does not send that header, so if your router uses busybox, you may have to wget another site.