Skip to content

<chrono>: current_zone() throws on "British Columbia" timezone added in October 2026 Windows updates #6490

Open

Description

Describe the bug

Several new timezones were added to Windows in October 2026, including "Pacific Time (British Columbia)":

current_zone() throws on the new 'Pacific Time (British Columbia)' timezone

Command-line test case

PREREQUISITES:

PS C:\Users\fred> cat test.cpp
#include <chrono>

#include <print>

int main() try {
  using namespace std::chrono;
  std::println("Retrieving timezone");
  const auto tz = current_zone();
  std::println("Retrieving timezone name");
  const auto name = tz->name();
  std::println("Printing tz name");
  std::println("TZ name: {}", name);
  std::println("Making zoned time");
  const auto zt = zoned_time { tz, system_clock::now() };
  std::println("Printing zoned time");
  std::println("zoned time {}", zt);
  return 0;
} catch (const std::exception& e) {
  std::println("Exception: {}", e.what());
  return 1;
}
PS C:\Users\fred> cl.exe /std:c++latest test.cpp /EHsc
Microsoft (R) C/C++ Optimizing Compiler Version 19.51.36260 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

/std:c++latest is provided as a preview of language features from the latest C++
working draft, and we're eager to hear about bugs and suggestions for improvements.
However, note that these features are provided as-is without support, and subject
to changes or removal as the working draft evolves. See
https://go.microsoft.com/fwlink/?linkid=2045807 for details.

test.cpp
Microsoft (R) Incremental Linker Version 14.51.36260.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:test.exe
test.obj
PS C:\Users\fred> ./test.exe
Retrieving timezone
Exception: unable to locate time_zone with given name

Expected behavior

current_zone() should not throw on timezones included in Windows.

Example output:

PS C:\Users\fred> ./test.exe
Retrieving timezone
Retrieving timezone name
Printing tz name
TZ name: America/Chicago
Making zoned time
Printing zoned time
zoned time 2026-10-16 04:23:52.8498235 CDT

STL version

PS C:\Users\fred> cl.exe
Microsoft (R) C/C++ Optimizing Compiler Version 19.51.36260 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

Additional context

This is related to:

I would generally expect existing binaries to continue to work when Windows adds new timezones, including applications that are using previous versions of the STL; IMO the right fix here is for the STL team to attempt to get whichever team is responsible for icu.dll to update that.

Activity

  1. changed the title [-]`<chrono>`: `current_zone()` throws on "British Columbia" timezone added in recent Windows updates[/-] [+]`<chrono>`: `current_zone()` throws on "British Columbia" timezone added in October 2026 Windows updates[/+] on Oct 16, 2026
  2. added
    bug
    chrono
    on Oct 16, 2026
  3. YexuanXiao commented on Oct 17, 2026

    @YexuanXiao
    Contributor

    You should report the issue that icu.dll has not been updated correctly to the Feedback Hub.

  4. TerenceRussell commented on Nov 2, 2026

    @TerenceRussell

    I have all recent Windows 11 updates as of 2026-11-02. I have all Visual Studio 2022 updates as of the same.

    My Windows 11's time zone is set to 'Mountain Time (Alberta)' and this results in std::chrono::tzdb::locate_zone() (via std::chrono::current_zone()) to throw an exception.

    It's not clear if I'm waiting on another WIndows update, or if there needs to be a std::chrono update. Any advice?

    Image

    Also, looks like the c:\windows\system32\ICU.dll was updated today:

    Image
  5. YexuanXiao commented on Nov 2, 2026

    @YexuanXiao
    Contributor

    STL does not have a builtin time zone table; all time zone names are provided by ICU, so there is nothing STL can do. It looks like Windows is very chaotic on this issue, because v72.1.0.4 does not even appear in https://github.com/microsoft/icu/blob/master/changelog.md.

  6. StephanTLavavej commented on Nov 2, 2026

    @StephanTLavavej
    Member

    Agreed, I don't believe there's anything the STL can do about this. The entire reason we rely on ICU provided by the OS is that the STL cannot be in the business of dynamically updating timezones as legislation is passed around the world. The OS (via Windows Update) needs to do that, and it needs to provide self-consistent support.

  7. TerenceRussell commented on Nov 2, 2026

    @TerenceRussell

    Appears like this issue can be closed as its out of scope for STL.

    While waiting for the icu.dll situation to be addressed, a low precision solution is to revert to std::localtime or Win32 GetLocalTime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugchronoexternal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions