summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <rsd@gnu.org>2019-05-26 10:08:59 -0400
committerrsiddharth <rsd@gnu.org>2019-05-26 10:08:59 -0400
commit13a80655eaac245e3418d66fb7e7247d6be6efab (patch)
tree09c68a32651e7509d146a28f33e7f382069e0816
parent2cf87b3dbbe7159676ea724b031ba8dc3bd0476c (diff)
Update LPiCal.mk_datetime.
* lps_gen.py (LPiCal.mk_datetime): Use format for formatted string.
-rw-r--r--lps_gen.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lps_gen.py b/lps_gen.py
index 2dc6742..6c2bf8e 100644
--- a/lps_gen.py
+++ b/lps_gen.py
@@ -174,10 +174,11 @@ class LPiCal(object):
hour = time.split(':')[0]
minute = time.split(':')[1]
- datetime_str = '%s %s %s %s:%s:%s' % (day, month, self.lp_year,
- hour.zfill(2),
- minute.zfill(2),
- '00')
+ datetime_str = '{} {} {} {}:{}:{}'.format(day, month,
+ self.lp_year,
+ hour.zfill(2),
+ minute.zfill(2),
+ '00')
dt_object = datetime.strptime(datetime_str, datetime_fmt)