ChickenBenny commented on code in PR #75737:
URL: https://github.com/apache/airflow/pull/75737#discussion_r4490360316


##########
go-sdk/pkg/execution/messages.go:
##########
@@ -178,13 +178,15 @@ func ifaceStringPtr(v any) *string {
 }
 
 // ifaceTimePtr returns a pointer to the time carried by a nullable date-time
-// field decoded as any, or nil when missing/null. msgpack decodes the
-// supervisor's timestamp extension straight into time.Time.
+// field decoded as any, or nil when missing/null, in UTC. The supervisor's
+// timestamp extension carries no time zone and msgpack decodes it with
+// time.Unix, which returns the worker's local zone.
 func ifaceTimePtr(v any) *time.Time {
        t, ok := v.(time.Time)
        if !ok {
                return nil
        }
+       t = t.UTC()

Review Comment:
   Thanks! Went with the second option: the generator now retypes every 
date-time to `genmodels.Time` (`*Time` when nullable), which decodes in UTC. So 
fields like `RunAfter` are covered once we expose them.
   
   One difference: `Time` is a defined type (`type Time time.Time`), not a 
wrapper struct, so there's no `.Value`. At the boundary it's just 
`(*time.Time)(dagRun.LogicalDate)`.
   
   The generator also drops the `time` import, so any `time.Time` it misses 
fails to compile instead of quietly decoding in local time.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to