! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Entering an invalid timezone falls back to UTC with no clear error
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Rob Day 2019-10-12 13:52:37 CEST
Created attachment 9110 
Patch to display an error on invalid timezones

I mistakenly entered "BST" in the "Timezone" field in the Clock plugin's properties. This isn't valid (it needs to be Europe/London) but nothing told me this - it just fell back to UTC. (This would have showed up if I'd had timezone included in the display, but I didn't.)

This looks like it's ultimately a problem with g_time_zone_new not providing any error response (https://gitlab.gnome.org/GNOME/glib/issues/553).

However, the panel plugin could work around this by checking for itself whether the timezone exists, and I've got a patch that does so (attached).
Comment 1 Git Bot editbugs 2019-10-13 01:09:04 CEST
Simon Steinbeiss referenced this bugreport in commit 285ee742f98707516c79a4d22f08285f448d28cd

clock: Validate timezone entry (Bug #16036)

https://git.xfce.org/xfce/xfce4-panel/commit?id=285ee742f98707516c79a4d22f08285f448d28cd
Comment 2 Simon Steinbeiss editbugs 2019-10-13 01:10:06 CEST
Thanks, nice improvement (and goes along nicely with the format validator)!
Comment 3 Simon Steinbeiss editbugs 2019-10-13 01:18:43 CEST
Ooops, I forgot to amend the commit before pushing with you as the patch author. I apologize.
(I had to correct some small things, so I couldn't simply git am the commit)

Bug #16036

Reported by:
Rob Day
Reported on: 2019-10-12
Last modified on: 2019-10-13

People

Assignee:
Simon Steinbeiss
CC List:
1 user

Version

Version:
4.14.1

Attachments

Additional information