Skip to content

Commit

Permalink
Fix datetime in local GCP flow
Browse files Browse the repository at this point in the history
  • Loading branch information
esebesto committed Nov 3, 2023
1 parent f6cd14e commit f60422c
Show file tree
Hide file tree
Showing 2 changed files with 3 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(".")
4 changes: 2 additions & 2 deletions nise/generators/gcp/gcp_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ 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")
# Local reports doesn't work with tz info, Bigquery uses UTC by default
return in_date.strftime("%Y-%m-%dT%H:%M:%S")

@abstractmethod
def generate_data(self, report_type=None):
Expand Down

0 comments on commit f60422c

Please sign in to comment.