On 2024-01-06 14:30, Stephen Colebourne via tz wrote:
On Sat, 6 Jan 2024 at 20:31, Paul Eggert via tz<tz@iana.org> wrote:
What matters to users is "What time is it?". Questions like "Is daylight saving time observed now?", "Is daylight saving ever observed?" and "What is the standard time now, ignoring any DST observance?" are timekeeping nerds' means to that end, not the end itself, and are best left to tzcode's internals. I understand you wish this were true. But it hasn't been true ever since Java had a date-time API parsing the TZDB source files. Java does expose those things, and will continue to do so.
It's true even with the Java API, in the sense that Java users by and large have the same needs as POSIX users: they need to know local time, not all the internal machinery that underlies calculations of local time. It was a design mistake for the POSIX API to expose some of that internal machinery, as exposing it causes more trouble in user code than it cures: it causes users to mistakenly think that they need to know about and use tm_isdst to get their work done. To the extent that the Java APIs inherit this POSIX misfeature, they have a similar problem. The example <https://stackoverflow.com/questions/1060479/determine-whether-daylight-savin...> that you recently gave is an instance of this similar problem. Of course this is all water under the bridge for the current APIs. However, it would be better if future protocols and APIs and formats did not have to repeat these mistakes of their predecessors.