Skip to content

Commit

Permalink
Merge pull request #174 from dagwieers/time_format
Browse files Browse the repository at this point in the history
Document and fix a known Kodi bug in Up Next
  • Loading branch information
im85288 authored Feb 21, 2020
2 parents 82654a5 + 4a3557c commit e8bfd24
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion resources/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,13 @@ def localize(string_id):

def localize_time(time):
"""Localize time format"""
time_format = getRegion('time').replace(':%S', '') # Strip off seconds
time_format = getRegion('time')

# Fix a bug in Kodi v18.5 and older causing double hours
# https://github.com/xbmc/xbmc/pull/17380
time_format = time_format.replace('%H%H:', '%H:')

# Strip off seconds
time_format = time_format.replace(':%S', '')

return time.strftime(time_format)

0 comments on commit e8bfd24

Please sign in to comment.