From 0756aa9f6ce3f3c0ff459b9eee119414f64c94f8 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Thu, 13 Dec 2012 17:16:20 -0800 Subject: [PATCH] Gerald's time-stamp format was inconsistent. The different os / python versions had different defaults for '%c'. I'd previously changed the read function, but not the generation function. Also it didn't look quite like some of my timestamps in my files. So now both creating the time stamp and parsing the time stamp are using the same date string. --- htsworkflow/pipelines/gerald.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htsworkflow/pipelines/gerald.py b/htsworkflow/pipelines/gerald.py index 03c7d10..75d7d2e 100644 --- a/htsworkflow/pipelines/gerald.py +++ b/htsworkflow/pipelines/gerald.py @@ -177,7 +177,7 @@ class CASAVA(Alignment): if self.tree is None: return if len(self.tree.xpath('TIME_STAMP')) == 0: - time_stamp = self.date.strftime('%c') + time_stamp = self.date.strftime("%a %b %d %H:%M:%S %Y") time_element = ElementTree.Element('TIME_STAMP') time_element.text = time_stamp self.tree.append(time_element) @@ -189,7 +189,7 @@ class CASAVA(Alignment): if len(time_element) == 1: timetuple = time.strptime( time_element[0].text.strip(), - "%a %d %b %Y %I:%M:%S %p") + "%a %b %d %H:%M:%S %Y") return datetime(*timetuple[:6]) return super(CASAVA, self)._get_date() date = property(_get_date) -- 2.30.2