Skip to content

Could not find file '/usr/share/zoneinfo/Europe/Kiev'. #6072

Closed as not planned

Description

@TrayanZapryanov

Describe the bug

Once we migrated from jammy:8.0.10-amd64 to runtime:9.0.0-noble-chiseled-extra-amd64,
I can see following exception in our production logs:
Could not find file '/usr/share/zoneinfo/Europe/Kiev'.
Image
Image

Is there something wrong in our code?

Which .NET image(s) are you using?

mcr.microsoft.com/dotnet/runtime:9.0.0-noble-chiseled-extra-amd64

Steps to reproduce

TimeZoneInfo.FindSystemTimeZoneById("FLE Standard Time")

Other information

No response

Output of docker version

Output of docker info

Activity

  1. mthalman commented on Nov 22, 2024

    @mthalman
    Member

    This is due to a difference in the tzdata package versions between Ubuntu 22.04 (jammy) and Ubuntu 24.04 (noble).

    In Ubuntu 22.04, the path usr/share/zoneinfo/Europe/Kiev was a symbolic link to the path usr/share/zoneinfo/Europe/Kyiv. In Ubuntu 24.04, that symbolic link was removed, leaving only the usr/share/zoneinfo/Europe/Kyiv path.

    Pinging @dotnet/area-system-globalization for input on why TimeZoneInfo isn't accounting for this.

  2. richlander commented on Nov 22, 2024

    @richlander
    Member

    I am wondering if we should create breaking change issues, per OS version, and add to them over time. This is similar to the TLS 1.x change we saw earlier. We haven't come up with a good model on how to record these. Recording them in docs doesn't seem right to me. Docs should be dedicated to .NET product breaks. The goal is to make the full set of breaks discoverable.

    @gewarren

  3. mthalman commented on Nov 22, 2024

    @mthalman
    Member

    Also see: https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#p-99950-tzdata-package-split

    So this can be resolved by installing tzdata-legacy. I tried that and confirmed it does create the usr/share/zoneinfo/Europe/Kiev path.

    But ideally, whatever code is looking for that path would be updated to use usr/share/zoneinfo/Europe/Kyiv instead.

  4. richlander commented on Nov 22, 2024

    @richlander
    Member

    I talked to @tarekgh. If I understood correctly, the globalization APIs look for the constructed path from the given IANA name. There is no auto-conversion. That's the role the backwards compat package/path plays, which makes sense.

    This is an ecosystem change. App code will need to be updated to the new names (or always install the compat package).

  5. tarekgh commented on Nov 24, 2024

    @tarekgh
    Member

    To add, when doing TimeZoneInfo.FindSystemTimeZoneById("FLE Standard Time") , the .NET uses ICU to convert Windows timezone Id to IANA id which convert it to Europe/Kiev. You may file a ticket to ICU to let it do the mapping to the updated name Europe/Kyiv instead.

  6. lbussell commented on Nov 25, 2024

    @lbussell
    Member

    [Triage] Closing this as not planned since it's a change in the ICU package and not an issue with .NET. One workaround is to install the tzdata-legacy package from Ubuntu. The other workaround is to use "Europe/Kyiv" as the Time Zone ID directly.

  7. moved this from Backlog to Done in .NET Dockeron Nov 25, 2024
  8. mthalman commented on Nov 25, 2024

    @mthalman
    Member
  9. tarekgh commented on Nov 25, 2024

    @tarekgh
    Member

    @mthalman No.

    As I stated before we depend on the ICU API to do the mapping. The data you are pointing at is embedded inside ICU. If anything, it needs to change it will be in ICU. The .NET is not carrying any data for time zones.

  10. tarekgh commented on Nov 25, 2024

    @tarekgh
    Member

    Linking some related issue talking about the mapping between Windows and ICU names.
    tc39/proposal-canonical-tz#16

  11. TrayanZapryanov commented on Nov 26, 2024

    @TrayanZapryanov
    Author

    @lbussell Just a newbie question:
    Do you have a sample how to install tzdata-legacy to chiseled image?
    At the moment we use this docker file

    FROM mcr.microsoft.com/dotnet/runtime:9.0.0-noble-chiseled-extra-amd64 AS base
    WORKDIR /publish
    COPY ./ContainerApp .
    ENTRYPOINT ["dotnet", "XXX.dll"]

  12. richlander commented on Nov 26, 2024

    @richlander
    Member

    Here's a workaround: rockcrafters/dotnet#21 (comment).

    You can file an issue to ask us to consider adding the legacy support in the extra image. It's a worthwhile conversation. I'd prefer to not continue using this issue for that since the original topic has been resolved.

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions