I am using specifically Luxon. However this question applies to all date/time libraries.
What happens if a country (say the USA) decides to remain in DST the whole year? To the point, libraries must contain a list of timezones and DST dates. If DST changes for a country, does a new version of the library need to be published with the updated DST values?
It depends on the library.
Some libraries bundle their own time zone data and needed to be updated regularly to receive such updates. Examples include:
Other libraries take their time zone data from from the host environment they run within, which might in-turn take their time zone data from a library, or from the host OS. Examples include:
Intl
, which is most commonly implemented via ICU, which is distributed by the browser (or Node.js)zoneinfo
(built-in to Python), which uses the host OS time zone data if available, or the python tzdata
package if not.java.time
(built-in to Java), which uses the time zone data distributed with the Java RuntimeTimeZoneInfo
(built-in to .NET), which uses the time zone data from the host operating systemThese lists are not intended to be comprehensive.
The ultimate source of the data is usually the IANA TZ Database. All libraries that ship their own time zone data derive it from there.
However, Microsoft also still maintains time zone data for Windows separately. It is still used by .NET on Windows platforms, and other older Windows technologies such as Win32 APIs.