Dmitry Khalanskiy [JB]
07/30/2025, 2:23 PM@Serializable
annotation from TimeZone
and FixedOffsetTimeZone
in the future and deprecate the serializers for these classes. Please restructure your code to send and receive the timezone identifier (timeZone.id
, converted back to the timezone with TimeZone.of(id)
) instead of the timezone itself.
The reason for this change is that the timezone database used in the code performing the deserialization can be different from the one that was used for serialization. This may even lead to crashes if the deserializing side does not know the serialized timezone identifier. The explicit need to call TimeZone.of
on the deserialization result gives a more controlled environment for handling the failure and demonstrates the risk better.