You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Result storage moves a timestamp before 1883 by the zone's local mean time #9074
A timestamp before 1883 comes out of a workflow's result storage minutes away from the value the operator produced. On a machine set to America/Los_Angeles, 1600-06-15 08:30:00 is stored as 1600-06-15 08:37:02. 1677-09-21 00:00:00 becomes 00:07:02. A timestamp from 2024 is unchanged.
IcebergUtil writes a TIMESTAMP field as ts.toInstant.atZone(ZoneId.systemDefault()).toLocalDateTime and reads it back with Timestamp.valueOf(ldt). The two halves of the write follow different zone rules. java.sql.Timestamp turns its wall clock into an instant with java.util.Date's rules, which give a date before 1900 the zone's standard offset, -8:00. java.time turns that instant back into a wall clock with the zone's full history, which before 1883 is local mean time, -7:52:58. The 7 minutes 2 seconds between them is what the stored value gains. The size of the shift depends on the machine's zone.
Writing the field as ts.toLocalDateTime keeps the wall clock, since Timestamp.valueOf is its inverse.
How to reproduce?
On a machine set to America/Los_Angeles, the write step alone shows it in jshell:
End to end, a workflow that reads a CSV with 1600-06-15 08:30:00 in a timestamp column and passes it through Distinct reads 1600-06-15 08:37:02.0 back from its result storage, the storage the result panel reads.
Activity
feat(workflow-core): store a timestamp before 1883 at the wall clock …