Skip to content

Commit 3ee8580

Browse files
pannalruuk
authored andcommitted
Don't strip the leading zero(s) for 24h time format
1 parent 9b60530 commit 3ee8580

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/windows/seekdialog.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,16 @@ def updateCurrent(self, update_position_control=True):
634634
self.setProperty('time.left', util.timeDisplay(self.duration - to))
635635

636636
_fmt = '%I:%M %p'
637+
stripLeadingZero = True
637638
if util.time_format_twentyfour:
638639
_fmt = '%H:%M'
639-
self.setProperty('time.end', time.strftime(_fmt, time.localtime(time.time() + ((self.duration - to) / 1000))).lstrip('0'))
640+
stripLeadingZero = False
641+
642+
val = time.strftime(_fmt, time.localtime(time.time() + ((self.duration - to) / 1000)))
643+
if stripLeadingZero and val[0] == "0":
644+
val = val[1:]
645+
646+
self.setProperty('time.end', val)
640647

641648
def doSeek(self, offset=None, settings_changed=False):
642649
self._applyingSeek = True

0 commit comments

Comments
 (0)