Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dft/setter_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self):

def get_current_time_as_html_fragment(self):
current_time = self.time_provider.now()
current_time_as_html_fragment = "<span class=\"tinyBoldText\">" + current_time.hour + ":" + current_time.minute + "</span>"
current_time_as_html_fragment = "<span class=\"tinyBoldText\">{}</span>".format(current_time)
return current_time_as_html_fragment
"""

Expand All @@ -31,7 +31,7 @@ def set_time_provider(self, time_provider):

def get_current_time_as_html_fragment(self):
current_time = self.time_provider.now()
current_time_as_html_fragment = "<span class=\"tinyBoldText\">" + current_time + "</span>"
current_time_as_html_fragment = "<span class=\"tinyBoldText\">{}</span>".format(current_time)
return current_time_as_html_fragment

class ProductionCodeTimeProvider(object):
Expand All @@ -42,7 +42,7 @@ class ProductionCodeTimeProvider(object):

def now(self):
current_time = datetime.datetime.now()
current_time_formatted = str(current_time.hour) + ":" + str(current_time.minute)
current_time_formatted = "{}:{}".format(current_time.hour, current_time.minute)
return current_time_formatted

class MidnightTimeProvider(object):
Expand Down