Some locales need more than 2 chars for AM/PM, make the buffer a bit larger
This commit is contained in:
parent
3e08fc2f92
commit
6aa08a3282
|
@ -249,7 +249,7 @@ public static bool is_dark_theme(Gtk.Widget widget) {
|
||||||
private static uint8 is24h = 0;
|
private static uint8 is24h = 0;
|
||||||
public static bool is_24h_format() {
|
public static bool is_24h_format() {
|
||||||
if (is24h == 0) {
|
if (is24h == 0) {
|
||||||
string p_format = " "; // Leaving room to be filled by strftime
|
string p_format = " "; // Leaving room to be filled by strftime
|
||||||
Time.local(0).strftime((char[]) p_format.data, "%p");
|
Time.local(0).strftime((char[]) p_format.data, "%p");
|
||||||
is24h = p_format.strip() == "" ? 1 : -1;
|
is24h = p_format.strip() == "" ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue