On Mon, 3 Mar 2025 at 21:35, Jonathan Wakely <jwak...@redhat.com> wrote:
>
> On Mon, 3 Mar 2025 at 21:24, Matt Johnson-Pint via tz <tz@iana.org> wrote:
> >
> > Yes.  Australia/Lord_Howe currently has a 30-minute difference between its 
> > standard and daylight times.  Also, Antarctica/Troll has a 2-hour 
> > difference.
> >
> > I'm not sure if there's an easy way to determine this directly from the tz 
> > files, but since the data is also parsed and distributed through various 
> > platforms, languages, libraries, and tools, it's probably something you 
> > could do externally.  For example, you could probably write some Python 
> > script with zoneinfo data, which originates from here.
>
> Those are the only two examples according to this C++ program:
>
> #include <chrono>
> #include <print>
>
> int main()
> {
>   using namespace std::chrono;
>   sys_days summer(2025y/6/21), winter(2025y/12/21);
>   const auto& db = get_tzdb();
>   std::println("{}", db.version);
>   for (const auto& tz : db.zones)
>   {
>     auto info1 = tz.get_info(summer);
>     auto info2 = tz.get_info(winter);
>     if (info1.offset != info2.offset)
>     {
>       if (abs(info1.offset - info2.offset) != 1h)
>         std::println("{} has offset {} in summer and {} in winter",
>             tz.name(), info1.offset, info2.offset);
>     }
>   }
> }
>
> The output on my system was:
>
> 2025a
> Antarctica/Troll has offset 7200s in summer and 0s in winter

Of course, June is not summer and December is not winter in Australia, oops :)
Pretend I use June and December instead.

> Australia/Lord_Howe has offset 37800s in summer and 39600s in winter

Reply via email to