Skip to content

Commit

Permalink
Fix GCP datetime format for BigQuery (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
esebesto authored Nov 3, 2023
1 parent 1986d1f commit bb865c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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.3"
__version__ = "4.4.4"

VERSION = __version__.split(".")
3 changes: 2 additions & 1 deletion nise/generators/gcp/gcp_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +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.")
return in_date.strftime("%Y-%m-%dT%H:%M:%S%z")
# 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")

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

0 comments on commit bb865c2

Please sign in to comment.