Use custom hour with microsecond format
Appending microsecond to the locale time format does not always work when the locale use AM/PM notation. issue6398 review30211002
This commit is contained in:
1 parent
8dd71b02b1
commit
7409e024fa
2 files changed
+4
-4
No files matched your search
@@ -254,7 +254,7 @@ class Form(SignalEvent, TabContent):
|
||||
except RPCException:
|
||||
return
|
||||
date_format = self.screen.context.get('date_format', '%x')
|
||||
datetime_format = date_format + ' %X.%f'
|
||||
datetime_format = date_format + ' %H:%M:%S.%f'
|
||||
message_str = ''
|
||||
for line in res:
|
||||
for (key, val) in fields:
|
||||
@@ -280,7 +280,7 @@ class Form(SignalEvent, TabContent):
|
||||
return
|
||||
revision = self.screen.context.get('_datetime')
|
||||
format_ = self.screen.context.get('date_format', '%x')
|
||||
format_ += ' %X.%f'
|
||||
format_ += ' %H:%M:%S.%f'
|
||||
revision = Revision(revisions, revision, format_).run()
|
||||
# Prevent too old revision in form view
|
||||
if (self.screen.current_view.view_type == 'form'
|
||||
@@ -304,7 +304,7 @@ class Form(SignalEvent, TabContent):
|
||||
revision = self.screen.context.get('_datetime')
|
||||
if revision:
|
||||
format_ = self.screen.context.get('date_format', '%x')
|
||||
format_ += ' %X.%f'
|
||||
format_ += ' %H:%M:%S.%f'
|
||||
revision = datetime_strftime(revision, format_)
|
||||
self.title.set_label('%s @ %s' % (self.name, revision))
|
||||
else:
|
||||
|
||||
@@ -14,7 +14,7 @@ _ = gettext.gettext
|
||||
class Revision(object):
|
||||
'Ask revision'
|
||||
|
||||
def __init__(self, revisions, revision=None, format_='%x %X.%f'):
|
||||
def __init__(self, revisions, revision=None, format_='%x %H:%M:%S.%f'):
|
||||
self.parent = get_toplevel_window()
|
||||
self.win = gtk.Dialog(_('Revision'), self.parent,
|
||||
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
|
||||
|
||||
Reference in new issue
Block a user