emcp
10/02/2022, 3:16 PM2022-10-02T15:14:20.281830Z [info ] time=2022-10-02 17:14:20 name=...
Notice this leftmost datetime? Where is this set? It seems to be off by 2 hoursemcp
10/02/2022, 3:17 PMemcp
10/02/2022, 3:19 PMchristoph
10/02/2022, 11:32 PMemcp
10/03/2022, 4:08 PMemcp
10/03/2022, 4:09 PMchristoph
10/03/2022, 8:25 PMZ) suffix. Zulu time is the timezone that has no offset from UTC.emcp
10/03/2022, 8:28 PMemcp
10/03/2022, 8:31 PMdef generate_timestamp(requested_timestamp_type):
if requested_timestamp_type == 'hive':
# TRINO and HIVE requires this format for native timestamps in parquet
return round(int(datetime.utcnow().timestamp()*1000000), -3)
else:
# POSTGRESQL
return datetime.utcnow().isoformat() + 'Z'
Thanks for the checkinchristoph
10/03/2022, 8:31 PMZ as "Zulu time", but yes, it's UTC (not to be confused with GMT)emcp
10/03/2022, 8:33 PMchristoph
10/03/2022, 8:34 PMpendulum as a helper library (Meltano SDK already depends on pendulum) for datetime functionality.christoph
10/03/2022, 8:36 PMutcnow() ... https://blog.ganssle.io/articles/2019/11/utcnow.htmlemcp
10/03/2022, 8:56 PM