parsing in admin/src/main/scala/za/co/absa/spline/admin/DateTimeUtils.scala
ZonedDateTime.parse allows both offset and name at the same time . I think it's good idea to accept all inputs that are valid for ZonedDateTime.parse
The issue with allowing only geographical zone id is that it is ambiguous. Not unique.
2022-10-30T02:30:00[Europe/Prague] is both:
2022-10-30T02:30+02:00[Europe/Prague]
2022-10-30T02:30+01:00[Europe/Prague]
This is the day and hour of change from summer time to winter time:
val start = ZonedDateTime.parse("2022-10-30T02:30:00+02:00[Europe/Prague]")
val end = start.plusHours(1)
// start: java.time.ZonedDateTime = 2022-10-30T02:30+02:00[Europe/Prague]
// end: java.time.ZonedDateTime = 2022-10-30T02:30+01:00[Europe/Prague]
Another interesting behaviour (not so relevant for us though) is this:
val start = ZonedDateTime.parse("2022-10-30T02:30:00+02:00")
val end = start.plusHours(1)
// start: java.time.ZonedDateTime = 2022-10-30T02:30+02:00
// end: java.time.ZonedDateTime = 2022-10-30T03:30+02:00
When no geographical zone id is provided the ZonedDateTime will stay in the same offset.
defaultZoneId: ZoneId parameter is not use at all
parsing in
admin/src/main/scala/za/co/absa/spline/admin/DateTimeUtils.scalaZonedDateTime.parseallows both offset and name at the same time . I think it's good idea to accept all inputs that are valid forZonedDateTime.parseThe issue with allowing only geographical zone id is that it is ambiguous. Not unique.
This is the day and hour of change from summer time to winter time:
Another interesting behaviour (not so relevant for us though) is this:
When no geographical zone id is provided the ZonedDateTime will stay in the same offset.
defaultZoneId: ZoneIdparameter is not use at all