swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.57k stars 10.36k forks source link

swift:5.7-amazonlinux2 build errors for `Date.formatted` #61839

Open mcritz opened 2 years ago

mcritz commented 2 years ago

Describe the bug Swift Docker images for amazonlinux2 cannot build Date.formatted()

Steps To Reproduce Steps to reproduce the behavior:

  1. Create MyProject package that uses Date.formatted() (or Date.ISO8601Format())
  2. docker run \ --rm \ --volume "$(pwd)/:/src" \ --workdir "/src/" \ swift:5.7-amazonlinux2 \ swift build --product MyProject -c release -Xswiftc -static-stdlib ...

Expected behavior Builds and run exactly as macOS build

Screenshots n/a

Environment (please fill out the following information)

Additional context Add any other context about the problem here.

tbkka commented 2 years ago

CC: @parkera

iliasaz commented 1 year ago

This is still an issue in 5.9 and in any linux.

parkera commented 1 year ago

The swift-foundation package includes the implementation for Date.formatted().