Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] incorrect date on hwclock.. no ntp client in base..
@ 2021-03-16 18:18 bcookatpcsd
  2021-03-18  6:36 ` Anachron
  2021-03-18 13:14 ` bcookatpcsd
  0 siblings, 2 replies; 3+ messages in thread
From: bcookatpcsd @ 2021-03-16 18:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1586 bytes --]

New issue by bcookatpcsd on void-packages repository

https://github.com/void-linux/void-packages/issues/29513

Description:

https://docs.voidlinux.org/config/date-time.html

Does not have any example how to fix the date and time on a system with incorrect date and time.. 

xpbs-install -S chrony wouldn't work because the ssl cert was so far in the future.. 

Can we get an example of, 

To set the date on a local system, where the local date and time is very out of sync..

date --set="20210316 14:10"

The would set the date to March 16th, 2021 and it is 2:10pm.

(then I could do xbps-install.. chrony.. etc..)

```
[root@voidME ~]# xbps-install -S chrony rsync 
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-musl-repodata' ...
Certificate verification failed for /C=US/O=Let's Encrypt/CN=R3
SSL_connect returned 1
ERROR: [reposync] failed to fetch file `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-musl-repodata': Operation not permitted
[root@voidME ~]# ntpdate
bash: ntpdate: command not found
[root@voidME ~]# date
Thu Jun 28 11:37:47 EDT 2018
[root@voidME ~]# date --set="20210316 14:10"
Tue Mar 16 14:10:00 EDT 2021
[root@voidME ~]# date
Tue Mar 16 14:10:01 EDT 2021
[root@voidME ~]# xbps-install -S chrony rsync 
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-musl-repodata' ...
x86_64-musl-repodata: 1646KB [avg rate: 18MB/s]

```

Also, my local network exports an ntp server and is running locally.. does the dhcpcd client not look for option 42?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: incorrect date on hwclock.. no ntp client in base..
  2021-03-16 18:18 [ISSUE] incorrect date on hwclock.. no ntp client in base bcookatpcsd
@ 2021-03-18  6:36 ` Anachron
  2021-03-18 13:14 ` bcookatpcsd
  1 sibling, 0 replies; 3+ messages in thread
From: Anachron @ 2021-03-18  6:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 302 bytes --]

New comment by Anachron on void-packages repository

https://github.com/void-linux/void-packages/issues/29513#issuecomment-801671049

Comment:
You can use `hwclock` by the `util-linux` package which should be available already no matter how you installed Void since it's included in all base packages.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: incorrect date on hwclock.. no ntp client in base..
  2021-03-16 18:18 [ISSUE] incorrect date on hwclock.. no ntp client in base bcookatpcsd
  2021-03-18  6:36 ` Anachron
@ 2021-03-18 13:14 ` bcookatpcsd
  1 sibling, 0 replies; 3+ messages in thread
From: bcookatpcsd @ 2021-03-18 13:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2192 bytes --]

New comment by bcookatpcsd on void-packages repository

https://github.com/void-linux/void-packages/issues/29513#issuecomment-801916803

Comment:
Great, I'll try that on the next one.. 

I'd still suggest getting "how to manually adjust the date" section to the Date-Time page in the docs.. 

```
[I] root@Void63 ~# hwclock -v
hwclock from util-linux 2.36.2
System Time: 1616073138.456523
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2018/07/01 08:48:28
Hw clock time : 2018/07/01 08:48:28 = 1530434908 seconds since 1969
Time since last adjustment is 1530434908 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2018-07-01 04:48:27.436904-04:00


[I] root@Void63 ~# chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^+ time1.google.com              1  10   377   600   -222us[ -474us] +/-   12ms
^* time4.google.com              1  10   377   520   -313us[ -567us] +/- 9640us
^+ time3.google.com              1  10   377   609   -998us[-1251us] +/-   10ms
^+ time2.google.com              1  10   377   701   -654us[ -905us] +/-   12ms
^+ time.cloudflare.com           3  10   377   581   -616us[ -869us] +/- 7837us
^+ time.cloudflare.com           3  10   377   658    -57us[ -309us] +/- 7904us

[I] root@Void63 ~# hwclock -w

[I] root@Void63 ~# hwclock -v
hwclock from util-linux 2.36.2
System Time: 1616073197.256809
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1616073193 seconds after 1969
Last calibration done at 1616073193 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2021/03/18 13:13:18
Hw clock time : 2021/03/18 13:13:18 = 1616073198 seconds since 1969
Time since last adjustment is 5 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2021-03-18 09:13:17.249374-04:00
```


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-18 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 18:18 [ISSUE] incorrect date on hwclock.. no ntp client in base bcookatpcsd
2021-03-18  6:36 ` Anachron
2021-03-18 13:14 ` bcookatpcsd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).