A1K28 commented on code in PR #35766:
URL: https://github.com/apache/beam/pull/35766#discussion_r2249048107


##########
sdks/python/apache_beam/yaml/examples/transforms/ml/taxi_fare/streaming_taxifare_prediction.yaml:
##########
@@ -53,8 +53,13 @@ pipeline:
         timestamp:
           callable: |
             from datetime import datetime, timezone
+            import re
+
+            _PAD_MICROS = re.compile(r'\.(\d{1,5})([+-]\d{2}:\d{2})$')
+
             def fn(row):
-              return 
datetime.fromisoformat(row.timestamp).astimezone(timezone.utc)
+                ts = _PAD_MICROS.sub(lambda m: '.' + m.group(1).ljust(6, '0') 
+ m.group(2), row.timestamp)

Review Comment:
   Done. I've also modified the workflow links in the description.



-- 
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.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to