Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-03-21 00:46:44

whatshisname
Member
Registered: 2023-03-20
Posts: 3

XFCE clock applet. Where does it get its time from? [SOLVED]

I'm running the latest version of Arch, so the latest version of XFCE4.

I have ntp set up and it's polling a bonafide time server.  System time is spot on.  I have system time weaved into my prompt and it's spot on and verified by a visit to timeanddate.com.

But the clock applet is all over the lot - at times as much as 30 minutes or more off the mark.

How does the clock applet determine what time it is?  If it isn't reading the system clock, what is it reading?

Thanks.

Last edited by whatshisname (2023-03-21 14:17:49)

Offline

#2 2023-03-21 01:21:37

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: XFCE clock applet. Where does it get its time from? [SOLVED]

Hello and welcome.

It uses glib functions which I believe use the system clock. The clock plugin also optionally supports timezones. Do you have one set up? Lets see what settings you are using:

xfconf-query -c xfce4-panel -p $(xfconf-query -c xfce4-panel -lv | grep clock | awk '{print $1}') -lv

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-03-21 01:40:20

whatshisname
Member
Registered: 2023-03-20
Posts: 3

Re: XFCE clock applet. Where does it get its time from? [SOLVED]

Here's what I have:

xfconf-query -c xfce4-panel -p $(xfconf-query -c xfce4-panel -lv | grep clock | awk '{print $1}') -lv
/plugins/plugin-5                      clock
/plugins/plugin-5/digital-layout       3
/plugins/plugin-5/digital-time-format  <span fgcolor="#fff" line_height="0.8"><b>%a <b>%_I:%H %p</b></b></span>
/plugins/plugin-5/mode                 2
/plugins/plugin-5/time-config-tool     settime

"settime" is a bash script I created in an effort to fix the problem.  It consists of this, which works from the command line:

#!/bin/bash
sudo ntpd -qg

I'd love a suggestion to use in lieu of my "settime" kluge.

Thanks.

Offline

#4 2023-03-21 01:52:31

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: XFCE clock applet. Where does it get its time from? [SOLVED]

<b>%a <b>%_I:%H %p

This is the problem. "%I" is the hour (01..12) and %H is the hour (00..23). I think %M (minute) is what you are looking for (in place of %H).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2023-03-21 02:04:00

whatshisname
Member
Registered: 2023-03-20
Posts: 3

Re: XFCE clock applet. Where does it get its time from? [SOLVED]

You are da man! :-)

I was blindly following a post on the net.  Copy and pasting without understanding was my undoing!

Many thanks.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 534.12 KiB (Peak: 534.96 KiB) ]