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

Timezone format (12/24hr) not used #4

Closed
ShaneF1 opened this issue May 23, 2020 · 8 comments
Closed

Timezone format (12/24hr) not used #4

ShaneF1 opened this issue May 23, 2020 · 8 comments
Labels
enhancement New feature or request

Comments

@ShaneF1
Copy link

ShaneF1 commented May 23, 2020

V1.0.6

A minor issue but the timezone format is not used when displaying ETA. If the system is configured to use 24hr format, the plug-in still displays 12hr format.

ETA TZ Format

@ShaneF1 ShaneF1 added the bug Something isn't working label May 23, 2020
@AlexVerrico
Copy link
Owner

Hi @ShaneF1
This is on the roadmap for the project, but probably for a few months. Just to confirm, you have your pi set to 24hr time?

@AlexVerrico AlexVerrico added enhancement New feature or request and removed bug Something isn't working labels May 23, 2020
@ShaneF1
Copy link
Author

ShaneF1 commented May 23, 2020

After setting TZ using "sudo dpkg-reconfigure tzdata" the local time is displayed in 24hr format. Is there a better way to do it?

@AlexVerrico
Copy link
Owner

I will have to do a bit of research about this, because I have the exact opposite situation, that is, I have set my time to display in 12hr format, but the ETA is displayed in 24hr format, so something clearly isn't right with with how we are setting the time display format, or with how the plugin finds out what format to use.

@ShaneF1
Copy link
Author

ShaneF1 commented May 26, 2020

From my reading (I'm a python novice), this might benefit from the addition of ",get_locale()" in line 35 __init_py:

strtime = format_time(finish_time,get_locale())

@AlexVerrico
Copy link
Owner

Hi @ShaneF1
Thanks for the suggestion.
I have added that to the development branch, but can't test it for a couple of days, if you would like to assist in testing, you can install the updated version from here: https://github.com/AlexVerrico/Octoprint-Display-ETA/archive/devel.zip
Cheers,
Alex.

@ShaneF1
Copy link
Author

ShaneF1 commented May 26, 2020

No, that didn't work. It gets tied up in a dependency chain which I don't have the experience to debug. For the moment I have hardcoded my time format.

strtime = format_time(finish_time,'HH:mm:ss')

@joshuacant
Copy link

My ETA time is also shown in 24h format even though I have run the tzdata reconfigure and picked a time zone that should be 12h (USA EDT). Perhaps a setting to toggle between the two formats would give people the control, rather than trying to determine it automatically, especially when a lot of people might never bother setting it correctly.

@AlexVerrico AlexVerrico mentioned this issue Jun 18, 2020
@AlexVerrico
Copy link
Owner

Hi everyone.
As of version 1.1.0 you can now configure this on the settings page for the plugin in Octoprint.
Cheers,
Alex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants