WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how does TCL know hardware clock timescale (UTC vs. local time)?  (Read 1773 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Devuan has the file  /etc/adjtime  which specifies whether the hardware clock is set to UTC or to local time. Does TCL have a similar file?

Put another way: My hardware ("BIOS") clock currently keeps UTC time. Suppose I wanted to change it to local time (so that I could dual boot with Windows, for example--not that I'd ever want that). What config file would I have to change in TCL so that my system time (e.g., output of  date  command) is correct?

« Last Edit: March 05, 2020, 12:28:43 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1511
Re: how does TCL know hardware clock timescale (UTC vs. local time)?
« Reply #1 on: March 05, 2020, 12:37:25 PM »
I found the bootcommand noutc

So I guess there's no file to edit. TCL assumes hardware clock keeps UTC. If it keeps local time, then user needs noutc boot code.

Simple and beautiful, like all things TCL ;D
« Last Edit: March 05, 2020, 12:41:24 PM by GNUser »

Offline ferran

  • Full Member
  • ***
  • Posts: 159
Re: how does TCL know hardware clock timescale (UTC vs. local time)?
« Reply #2 on: March 21, 2020, 03:53:58 PM »
I found a good command named hwclock from BusyBox in TC CorePlus v.11.0

No needed any extension extra! it's pretty to run into the console.

link:
https://git.busybox.net/busybox/tree/util-linux/hwclock.c

If I write in console

Code: [Select]
hwclock -r
sat Mar 21 20:48:10 2020 0.000000 seconds


-r              Show hardware clock time
-s              Set system time from hardware clock
-w              Set hardware clock from system time
--systz        Set in-kernel timezone, correct system time
-u               Assume hardware clock is kept in UTC
--localtime  Assume hardware clock is kept in local time
-f FILE      Use specified device (e.g. /dev/rtc2)

There are a lot of options and parameters to set within.
« Last Edit: March 21, 2020, 04:02:11 PM by ferran »
TC CorePlus v.11.1 i686 & lots of coffe