:mega: The next release of `kotlinx-datetime` will...
# kotlinx-datetime
d
📣 The next release of
kotlinx-datetime
will include a breaking change without an automatic migration path! • Currently,
TimeZone.toString()
returns
TimeZone.id
. For example,
TimeZone.of("Europe/Berlin").toString() == "Europe/Berlin"
. • After the change,
toString
will include additional information to help you debug where the timezone data is coming from, in an unspecified format. For example,
TimeZoneContext.System.get("Europe/Berlin").toString()
could be
Europe/Berlin[JVM]
, or
JvmTimeZone(Europe/Berlin)
, or
TimeZone(TimeZoneContext.System, Europe/Berlin)
. Please review your usages of
TimeZone.toString()
and see if you need to replace them with explicit calls to `id`:
TimeZoneContext.System.get("Europe/Berlin").id == "Europe/Berlin"
will continue to work like it did. The purpose of this breaking change is to allow you to easily distinguish between time zones obtained from
TimeZoneContext.System
and
TimeZoneContext.Bundled
and potentially, custom timezone databases. We don't encourage mixing several timezone databases in one code base—and would therefore like to help you notice a mixup when it does happen by accident.
👍 11
👍🏾 1