micronaut-serialization icon indicating copy to clipboard operation
micronaut-serialization copied to clipboard

Apply micronaut.serde.time-zone for ISO-8601 DateTimeFromatter in DefaultFormattedTemporalSerde

Open VladM-N1 opened this issue 1 year ago • 4 comments

Hi everyone, this is my PR to any open-source project ever. I believe this change more like QoL. Problem: micronaut.serde.time-zone configuration only applies to custom configured DateTimeFormatter which can be created only with: micronaut.serde.date-format.

VladM-N1 avatar Dec 12 '23 10:12 VladM-N1

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Dec 12 '23 10:12 CLAassistant

i dont think we should make this change. the time zone should not be adjusted by the serializer. i dont know why we support this for serialization in the first place, it should only apply for deserialization as a default tz.

yawkat avatar Dec 12 '23 14:12 yawkat

Ok, got it. So, if someone wants to play around with time zones in the serializer, it's probably a good idea to create custom serializer. But, I'm still wondering, are the micronaut.serde.time-zone will be removed?

VladM-N1 avatar Dec 12 '23 14:12 VladM-N1

I think it makes some sense for deserialization. my guess is that the serialization behavior was an accident.

yawkat avatar Dec 12 '23 14:12 yawkat