Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use user preference for AM/PM or 24h #193

Open
ChildishGiant opened this issue Dec 5, 2021 · 2 comments
Open

Use user preference for AM/PM or 24h #193

ChildishGiant opened this issue Dec 5, 2021 · 2 comments

Comments

@ChildishGiant
Copy link
Contributor

The user can chose if AM/PM or 24h is used but hourglass always uses a mix
image

24 hour:
image

AM/PM:
image

@ryonakano
Copy link
Collaborator

This is because Flatpak apps can't access to the host's gsettings. We uses the following method to detect the host's time format:

private string get_time_string () {
var system_time_format = new GLib.Settings ("org.gnome.desktop.interface");
var time_format = Granite.DateTime.get_default_time_format (
system_time_format.get_enum ("clock-format") == 1, false
);
return time.format (time_format);
}

This works if the app installed to /usr/share/bin, but it won't work on the sandboxed environment. Hopefully if elementary/granite#528 is merged we can fix this issue but the PR is not reviewed/merged yet. 😢

@ChildishGiant
Copy link
Contributor Author

Ah, I thought there may be some system-talk-name finish arg that could expose it but I imagine you've looked into that. Hopefully the linked PR gets merged then 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants