Closed clockworkgr closed 7 months ago
This change, combined with the fact we no longer allow empty/unset fields in cosmjs-types means that this:
https://github.com/cosmos/cosmjs/issues/704#issuecomment-797122415
must be addressed by no longer treating the timestamp as optional.
Released in 0.32.1 – thanks a lot!
This fixes an issue where an RFC3339 Date like
0001-01-01T00:00:00Z
(which is used as the default/empty/ value inCommitSig.Timestamp
whenBlockIdFlag
isABSENT
) was parsed as1901-01-01T00:00:00Z
due to the wayDate.UTC()
treats years 0 to 99.This led to incorrect timestamps being generated.
Unit test has been added.