From 50f537f9f2c88e802270963a3d55daf69accfead Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Fri, 17 Jan 2014 14:30:34 -0800 Subject: [PATCH] Convert timestamps from the runfolder file to a timezone aware time. We assume the sequencer was run in the same place as the server software --- htsworkflow/frontend/experiments/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htsworkflow/frontend/experiments/models.py b/htsworkflow/frontend/experiments/models.py index 600b917..ce2f6b7 100644 --- a/htsworkflow/frontend/experiments/models.py +++ b/htsworkflow/frontend/experiments/models.py @@ -17,6 +17,8 @@ from htsworkflow.frontend.samples.models import Library from htsworkflow.util.conversion import parse_flowcell_id from htsworkflow.pipelines import runfolder +import pytz + LOGGER = logging.getLogger(__name__) default_pM = 5 try: @@ -244,7 +246,8 @@ class FlowCell(models.Model): run.runfolder_name = run_xml_data.runfolder_name run.cycle_start = run_xml_data.image_analysis.start run.cycle_stop = run_xml_data.image_analysis.stop - run.run_start_time = run_xml_data.image_analysis.date + naive_run_start_time = datetime.datetime.fromordinal(run_xml_data.image_analysis.date.toordinal()) + run.run_start_time = pytz.timezone(settings.TIME_ZONE).localize(naive_run_start_time) run.image_software = run_xml_data.image_analysis.software run.image_version = run_xml_data.image_analysis.version run.basecall_software = run_xml_data.bustard.software -- 2.30.2