aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/util/helper.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2020-07-08 11:05:02 +0200
committerMarvin W <git@larma.de>2020-07-08 11:05:02 +0200
commit3e08fc2f92847b21e2c15457d58e4b154a89b462 (patch)
tree0278326426ebc3260b7a8f5a84027e3b682ff45b /main/src/ui/util/helper.vala
parenta21ddefbb987274991eb887e09d41274bd3e4a5e (diff)
downloaddino-3e08fc2f92847b21e2c15457d58e4b154a89b462.tar.gz
dino-3e08fc2f92847b21e2c15457d58e4b154a89b462.zip
Use strftime() instead DateTime.format(), fixes #875
Diffstat (limited to 'main/src/ui/util/helper.vala')
-rw-r--r--main/src/ui/util/helper.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala
index f36eac5e..d10e1447 100644
--- a/main/src/ui/util/helper.vala
+++ b/main/src/ui/util/helper.vala
@@ -249,7 +249,8 @@ public static bool is_dark_theme(Gtk.Widget widget) {
private static uint8 is24h = 0;
public static bool is_24h_format() {
if (is24h == 0) {
- string p_format = (new DateTime.now_utc()).format("%p");
+ string p_format = " "; // Leaving room to be filled by strftime
+ Time.local(0).strftime((char[]) p_format.data, "%p");
is24h = p_format.strip() == "" ? 1 : -1;
}
return is24h == 1;