Specify custom serialization for TimeRange, using Unix timestamps in seconds.
What problem is this fixing?
Rule's validity time ranges (from, until) only support integer Unix timestamps in seconds.
The client's Jackson configuration serializes/deserializes those values using millisecond timestamps.
From Jackson's JavaTimeModule:
For serialization, timestamps are written as fractional numbers (decimals), where the number is seconds and the decimal is fractional seconds, (...) If WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS is disabled, timestamps are written as a whole number of milliseconds.
Describe your change
Specify custom serialization for
TimeRange
, using Unix timestamps in seconds.What problem is this fixing?
Rule's validity time ranges (from, until) only support integer Unix timestamps in seconds. The client's Jackson configuration serializes/deserializes those values using millisecond timestamps. From Jackson's
JavaTimeModule
: