Skip to content

Commit

Permalink
Fix datetime in local GCP flow (#473)
Browse files Browse the repository at this point in the history
* Fix datetime in local GCP flow

* Update comment
  • Loading branch information
esebesto authored Nov 6, 2023
1 parent f6cd14e commit 4f82260
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nise/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "4.4.5"
__version__ = "4.4.6"

VERSION = __version__.split(".")
5 changes: 3 additions & 2 deletions nise/generators/gcp/gcp_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 4f82260

Please sign in to comment.