You are not logged in.
I just scratch installed arch with xfce4, and changed the hardware clock to UTC with
hwclock --systohc after setting the timezone with the xfce4 clock properties window. The panel clock now shows the correct local time when I set the proper timezone through the clock properties window.
The clock properties window has options for timezone and format, which I used
%a, %b %d %Y %rto get something like "Tue, Jan 16 2018 03:24:16 PM" local time. Is there a way to get a string that includes the current UTC weekday and time, like "Tue, Jan 16 2018 03:24:16 PM, Tue 20:24 UTC"?
Thanks
Last edited by whale (2018-01-16 21:09:08)
Offline
Offline
Thanks for the reply slithery, date -u gives UTC time. But that's not entirely helpful.
After some more digging, it looks like this is more of an xfce4 question rather than a date string question. (probably belongs on xfce4 forums) But I'll put out what I found so far.
It looks like xfce4 panel clock is actually a plugin.
The config file is ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
In it is an entry for the clock plugin. It looks like the values set from the panel goes into here.
<property name="plugin-5" type="string" value="clock">
<property name="timezone" type="string" value="EST"/>
<property name="mode" type="uint" value="2"/>
<property name="show-military" type="bool" value="false"/>
<property name="show-seconds" type="bool" value="true"/>
<property name="flash-separators" type="bool" value="false"/>
<property name="show-meridiem" type="bool" value="true"/>
<property name="digital-format" type="string" value="%a, %b %d %Y %r"/>
</property>The plugin itself isn't anywhere I can find, but the (compiled?) .so file is located at /usr/lib/xfce4/panel/plugins and inside is libclock.so.
So the answer to my own questions is probably to find the source of the clock plugin, figure out if it uses the date command somewhere (it probably does?), edit it to my liking, and put it all back together again.
If anyone knows if the source files exist, please post away.
I'll mark this as solved for now...
Offline
As an option, you can use the genmon-plugin to display the date in that format on the panel. Use a command like:
bash -c 'echo "$(date "+%a, %b %d %Y %r"), $(date -u "+%a %r") UTC"'The clock applet also pops up a calendar when clicked, so if you need that functionality you can tie in a zenity or yad calendar dialog to the click event of the genmon plugin. More info here.
Offline
So the answer to my own questions is probably to find the source of the clock plugin, figure out if it uses the date command somewhere (it probably does?), edit it to my liking, and put it all back together again.
If anyone knows if the source files exist, please post away.
Offline
Thanks toz and loqs.
Customizing the panel is now on my list as a weekend project.
Putting just 10 extra characters into the clock turns out to require more work than I previously thought.
Offline