Skip to content

Commit

Permalink
Updated plugin.py
Browse files Browse the repository at this point in the history
Fixed date & time
  • Loading branch information
Orlandoxx authored Aug 6, 2024
1 parent 75d83cd commit 30326bc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions weatherplugin/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,12 @@ def getWeatherDataCallback(self, result, errortext):
self["condition"].text = item.skytext
self["humidity"].text = _("Humidity: %s %%") % item.humidity
self["wind_condition"].text = item.winddisplay
c = time.strptime(item.observationtime, "%H:%M:%S")
self["observationtime"].text = _("Observation time: %s") % time.strftime("%H:%M", c)
try:
c = time.strptime(item.observationtime, "%H:%M:%S")
self["observationtime"].text = _("Observation time: %s") % time.strftime("%H:%M", c)
except:
c = time.strptime(item.observationtime, "%H.%M.%S")
self["observationtime"].text = _("Observation time: %s") % time.strftime("%H.%M", c)
self["observationpoint"].text = _("Observation point: %s") % item.observationpoint
self["feelsliketemp"].text = _("Feels like %s") % item.feelslike + "°" + self.weatherData.degreetype
else:
Expand Down

0 comments on commit 30326bc

Please sign in to comment.