GobySoft / dccl

Dynamic Compact Control Language
Other
17 stars 13 forks source link

Time Codec can't be used for later decoding #121

Closed tsaubergine closed 10 months ago

tsaubergine commented 1 year ago

The Time Codec uses system time to determine the correct day to use for encoding/decoding, which causes incorrect decoding when used later than the original message time.

We can fix this by updating the Time Codec to take a clock (defaulting to system_clock) that can be set to a custom clock when decoding later (e.g., from a log file).