You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/01/06 14:03:00 UTC

[GitHub] [airflow] RosterIn commented on a change in pull request #6354: [AIRFLOW-5664] Store timestamps with microseconds precision in GCSToPSQL

RosterIn commented on a change in pull request #6354: [AIRFLOW-5664] Store timestamps with microseconds precision in GCSToPSQL
URL: https://github.com/apache/airflow/pull/6354#discussion_r363304678
 
 

 ##########
 File path: airflow/operators/postgres_to_gcs.py
 ##########
 @@ -88,7 +90,8 @@ def convert_type(self, value, schema_type):
         Decimals are converted to floats. Times are converted to seconds.
         """
         if isinstance(value, (datetime.datetime, datetime.date)):
-            return time.mktime(value.timetuple())
+            return pendulum.parse(
+                value.isoformat()).in_tz('UTC').float_timestamp
 
 Review comment:
   Why UTC?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services