Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

[SOLVED] Timezone several hours off

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Zhme
n00b
n00b
Posts: 16
Joined: Sat Aug 24, 2019 2:17 am
Location: Chicago

[SOLVED] Timezone several hours off

  • Quote

Post by Zhme » Sat Apr 23, 2022 5:34 pm

I have been trying to troubleshoot my time being displayed incorrectly in my Polybar. Using the manual I tried to use the '/etc/timezone' method without luck. Using OpenRC I tried to follow the guide steps that would allow me to use the hwclock https://wiki.gentoo.org/wiki/System_time#OpenRC and am getting strange output.

Code: Select all

zhme@top ~ $ sudo hwclock --verbose
Password:
hwclock from util-linux 2.37.4
System Time: 1650716822.327941
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1637848585 seconds after 1969
Last calibration done at 1637848585 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: 2022/04/23 07:27:03
Hw clock time : 2022/04/23 07:27:03 = 1650698823 seconds since 1969
Time since last adjustment is 12850238 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2022-04-23 02:27:02.300319-05:00
The time that should have been displayed is ~12:27 for me now.


Following along down the instructions on that page I added the lines to '/etc/conf.d/hwclock' and issued the commands to restart and add to boot init.

I feel like I have conflicting settings that are combating each other to set the system time.

Please let me know which relevant output would be most useful!

P.S. On bootup I get an error that clock skew is detected with (null)
adjusting mtime of /run/openrc/deptree
Last edited by Zhme on Sat Apr 23, 2022 7:45 pm, edited 1 time in total.
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Sat Apr 23, 2022 5:41 pm

Plz let the kernel take care of system time

Code: Select all

KERNEL Letting the kernel sync the system clock
    Device Drivers --->
      [*] Real Time Clock --->
            [*]   Set system time from RTC on startup and resume
            (rtc0)  RTC used to set the system time
            [*]   Set the RTC time based on NTP synchronization
            (rtc0)  RTC used to synchronize NTP adjustment
            [*]   /sys/class/rtc/rtcN (sysfs)
            [*]   /proc/driver/rtc (procfs for rtc0)
            [*]   /dev/rtcN (character devices)
            <*>   PC-style 'CMOS'

Run something like

Code: Select all

ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

Install and enable chronyd.
In
/etc/chrony/chrony.conf
make sure you have

Code: Select all

pool pool.ntp.org iburst auto_offline
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
hwclockfile /etc/adjtime
rtconutc

Disable hwclock @boot runlevel and enable osclock @default.
Last edited by alamahant on Sat Apr 23, 2022 5:55 pm, edited 2 times in total.
:)
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sat Apr 23, 2022 5:50 pm

You might want to look at this question and its replies. In particular, set clock_systohc=YES in /etc/conf.d/hwclock. (If you use systemd, I would have to look up what to do.)
Top
Zhme
n00b
n00b
Posts: 16
Joined: Sat Aug 24, 2019 2:17 am
Location: Chicago

  • Quote

Post by Zhme » Sat Apr 23, 2022 7:44 pm

Thank you both. Chrony got rid of my headache. Perhaps the Handbook should reflect a similar suggestion for most cases!
Top
Post Reply

4 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic