Open maserowik opened 5 years ago
If you have unaltered code, open PyQtPiClock.py and go to line 285:
if "sunriseTime" in wxdata["daily"]["data"][0]: bottomText += (Config.LSunRise + "{0:%H:%M}".format(datetime.datetime.fromtimestamp( wxdata["daily"]["data"][0]["sunriseTime"])) + Config.LSet + "{0:%H:%M}".format(datetime.datetime.fromtimestamp( wxdata["daily"]["data"][0]["sunsetTime"])))
Change "{0:%H:%M}" to "{0:%I:%M}" if you just want the time or "{0:%I:%M %p}" if you want to display AM/PM as well.
Possibly, it makes sense to move items like this to the config.
This issue alone would be a few lines update on PyQtPiClock.py
and on the Config-Example
's
@n0bel Would you want a separate pull request for this? It may be that @ScottChapman might be taking this along on #125
Or even make another item to concentrate adding Config variables to move data from the program into the Config
Would gladly add a pull-request for this.
Propose as variablename LtopDateformat
with as default:
"{0:%A %B} {0.day}<sup>{1}</sup> {0.year}"
L for Locale . . .
Suggestion for contitental Europe might be
'{0:%A %e}{1} {0:%B} {0.year}'
Drop here 'sup' but KEEP the {1} to prevent substitution error.
I finally had some free time to completely redo my PiClock.
Fantastic work on the upgrade!!!
I do have a time stamp question. Is there a way to use 12 hour time instead of 24 hour time on the radar screen and the Sun Set?
Thanks Mike