This adds 6 tests for daylight savings. It tests what is returned by zonedTimeToUtc when the zoned time argument is during the times the local clock is moved forward or backwards.
It serves two main purposes:
Documenting behaviour for developers - for instance when a local time is repeated (the local clock has been turned backwards), the latter occurence is returned. This is perfectly useful behaviour, but the test serves to document it and ensure it remains consistent between updates.
As per the comments in the test, there is a question of what to do when a zoned time is provided which does not exist - for example when the zoned clock jumps from 01:59 to 03:00. At present the UTC time coresponding to zoned time at 01:00 is returned in the test which sets the zoned time to 02:00. The tests pass at the moment with this behaviour. Ultimately I believe either an error should be thrown, or the first time after (in this example, the UTC time corresponding to 03:00 zoned) returned, but that is a slightly separate issue to this pull request.
This adds 6 tests for daylight savings. It tests what is returned by zonedTimeToUtc when the zoned time argument is during the times the local clock is moved forward or backwards.
It serves two main purposes: