From 4f82260a58fbf5b65956df43996374e1be845a79 Mon Sep 17 00:00:00 2001 From: Eva Sebestova <73821679+esebesto@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:56:46 +0100 Subject: [PATCH] Fix datetime in local GCP flow (#473) * Fix datetime in local GCP flow * Update comment --- nise/__init__.py | 2 +- nise/generators/gcp/gcp_generator.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nise/__init__.py b/nise/__init__.py index b6de30d0..9ab713d3 100644 --- a/nise/__init__.py +++ b/nise/__init__.py @@ -1,3 +1,3 @@ -__version__ = "4.4.5" +__version__ = "4.4.6" VERSION = __version__.split(".") diff --git a/nise/generators/gcp/gcp_generator.py b/nise/generators/gcp/gcp_generator.py index fbcc7e5c..bb89c2e0 100644 --- a/nise/generators/gcp/gcp_generator.py +++ b/nise/generators/gcp/gcp_generator.py @@ -135,8 +135,9 @@ def timestamp(in_date): """Provide timestamp for a date.""" if not in_date or not isinstance(in_date, datetime.datetime): raise ValueError("in_date must be a date object.") - # Bigquery doesn't support UTC offset in the form of +HHMM -> using %Z instead of %z - return in_date.strftime("%Y-%m-%dT%H:%M:%S%Z") + # can't use tz info - local reports doesn't work with "UTC", + # BigQuery doesn't support UTC offset in the form of +HHMM + return in_date.strftime("%Y-%m-%dT%H:%M:%S") @abstractmethod def generate_data(self, report_type=None):