You are not logged in.

#1 2013-05-25 19:52:20

redhusky
Member
Registered: 2013-05-25
Posts: 2

AwesomeWM wrong time on text clock widget.

I'm having trouble getting Awesome's text clock widget to display the correct time. I want it to display utc time as seen in the date --utc command.
AFTAlXX.png
I tried checking the widget's lua file but i could only change the time's format.

Offline

#2 2013-05-25 21:20:07

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: AwesomeWM wrong time on text clock widget.

Are you sure that is what you want? If you took that screenshot shortly before posting here, you're clock is set to the wrong time, because at that time it was 14:46 CDT which corresponds to 19:46 UTC.

Normally you hardware clock should be kept in UTC, but yours is probably set to CDT. You should set the correct time and synchronize the hw clock to the new system time to fix that. If you really need the hw clock to be in localtime (because you dual boot with an old windows version, or a new one that you cannot configure to use UTC), run

# timedatectl set-local-rtc 1

You can also use timedatectl to set the time and sync to hw clock if you go with the proper solution of keeping time in UTC.

See wiki or similar topics for more info.

Offline

#3 2013-05-25 21:35:24

redhusky
Member
Registered: 2013-05-25
Posts: 2

Re: AwesomeWM wrong time on text clock widget.

I live in the central standard time zone and the time I want (i.e the time I see in my phone and other clocks in my house) is the one displayed by date --UTC. I'm using chrony for synchronization and I made sure to set the hwclock to UTC (I'm only running Arch on my system).

I just want the widget to display the time in utc but I have no idea how to do that. Thanks for your help.

Offline

#4 2013-05-25 22:10:44

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: AwesomeWM wrong time on text clock widget.

Well, if you don't want to fix your clock settings, I guess you'll have to change the widget so that it miscalculates the time to cancel that out.

Seriously, if you're like any other person I know, you have the clocks in your house set to CDT, not UTC. The widget is also displaying time in CDT (compare with first date output). Your system time is off by exactly the difference between CDT and UTC, since `date --utc` displays the time in CDT. That almost always means your hw clock is in fact set to local time, which is being interpreted as universal time (and then another -5 gets you to the incorrect CDT time).

Then it would seem chrony is not syncing, but that could be because the error is as big as five hours; try helping by setting it close to the actual time (and maybe reboot after syncing to hw clock). Or check time in BIOS, should be five hours ahead of clocks in your house.

Last edited by Raynman (2013-05-25 22:13:29)

Offline

Board footer

Powered by FluxBB