From da43e5fc5b8f54c1c7e5a7b8e8e3719eb4ed79ba Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Mon, 7 Aug 2023 18:51:41 -0700 Subject: [PATCH] Handle `csv_output_timestamp_column` and `output_timeformat` --- docs/GamUpdates.md | 5 +++++ src/GamUpdate.txt | 5 +++++ src/gam/__init__.py | 5 ++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index 2e895657..95b8ad3a 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -10,6 +10,11 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation. +### 6.62.01 + +Updated code so that when `gam.cfg` variables `csv_output_timestamp_column` and `output_timeformat` are both specified, +the timestamp is output in the alternate output time format. + ### 6.62.00 Added `output_dateformat` and `output_timeformat` variables to `gam.cfg` that provide alternate diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 4d9a40cc..f62d6325 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,11 @@ Merged GAM-Team version +6.62.01 + +Updated code so that when `gam.cfg` variables `csv_output_timestamp_column` and `output_timeformat` are both specified, +the timestamp is output in the alternate output time format. + 6.62.00 Added `output_dateformat` and `output_timeformat` variables to `gam.cfg` that provide alternate diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 0269fff0..99f889e5 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -8027,7 +8027,10 @@ class CSVPrintFile(): def SetTimestampColumn(self, timestampColumn): self.timestampColumn = timestampColumn - self.todaysTime = ISOformatTimeStamp(todaysTime()) + if not GC.Values[GC.OUTPUT_TIMEFORMAT]: + self.todaysTime = ISOformatTimeStamp(todaysTime()) + else: + self.todaysTime = todaysTime().strftime(GC.Values[GC.OUTPUT_TIMEFORMAT]) def SetFormatJSON(self, formatJSON): self.formatJSON = formatJSON