Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZoneOffset.of("Z") must return UTC #520

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ val scala3 = "3.3.3"
ThisBuild / scalaVersion := scala213
ThisBuild / crossScalaVersions := Seq("2.12.17", scala213, scala3)

ThisBuild / tlBaseVersion := "2.5"
ThisBuild / tlBaseVersion := "2.6"

ThisBuild / githubWorkflowBuildMatrixFailFast := Some(false)

4 changes: 3 additions & 1 deletion core/shared/src/main/scala/org/threeten/bp/ZoneOffset.scala
Original file line number Diff line number Diff line change
@@ -103,7 +103,9 @@ object ZoneOffset {
var _offsetId = offsetId
Objects.requireNonNull(_offsetId, "offsetId")

// "Z" is always in the cache
if (_offsetId == "Z")
return ZoneOffset.UTC

val offset: ZoneOffset = ID_CACHE.get(_offsetId)
if (offset != null)
return offset