Skip to content

Commit

Permalink
Remove a redundant parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhalanskyjb committed May 4, 2024
1 parent 2ca093f commit 019a06d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ val serializationVersion: String by project

java {
toolchain { languageVersion.set(JavaLanguageVersion.of(mainJavaToolchainVersion)) }
with(javaToolchains.launcherFor(toolchain).get().metadata) {
logger.info("Using JDK $languageVersion toolchain installed in $installationPath")
}
}

kotlin {
Expand Down
10 changes: 5 additions & 5 deletions core/windows/src/internal/TzdbInRegistry.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ internal class TzdbInRegistry: TimeZoneDatabase {
}
}
}
if (offsets.isEmpty()) { offsets.add(recurring.offsetAtYearStart(2020)) }
if (offsets.isEmpty()) { offsets.add(recurring.offsetAtYearStart()) }
TimeZoneRules(transitionEpochSeconds, offsets, recurringRules)
}
put(name, rules)
Expand Down Expand Up @@ -294,7 +294,7 @@ private fun SYSTEMTIME.toMonthDayTime(): MonthDayTime {

private sealed interface PerYearZoneRulesData {
val transitions: List<RecurringZoneRules.Rule<MonthDayTime>>
fun offsetAtYearStart(year: Int): UtcOffset
fun offsetAtYearStart(): UtcOffset
}

private class PerYearZoneRulesDataWithoutTransitions(
Expand All @@ -303,7 +303,7 @@ private class PerYearZoneRulesDataWithoutTransitions(
override val transitions: List<RecurringZoneRules.Rule<MonthDayTime>>
get() = emptyList()

override fun offsetAtYearStart(year: Int): UtcOffset = standardOffset
override fun offsetAtYearStart(): UtcOffset = standardOffset

override fun toString(): String = "standard offset is $standardOffset"
}
Expand All @@ -323,7 +323,7 @@ private class PerYearZoneRulesDataWithTransitions(
val standardTransition get() =
RecurringZoneRules.Rule(standardTransitionTime, offsetBefore = daylightOffset, offsetAfter = standardOffset)

override fun offsetAtYearStart(year: Int): UtcOffset = standardOffset
override fun offsetAtYearStart(): UtcOffset = standardOffset // TODO: not true in all years + all zones

override fun toString(): String = "standard offset is $standardOffset" +
", daylight offset is $daylightOffset" +
Expand All @@ -348,4 +348,4 @@ private val START_OF_YEAR = MonthDayTime(
date = JulianDayOfYear(0),
time = MonthDayTime.TransitionLocaltime(0),
offset = MonthDayTime.OffsetResolver.WallClockOffset,
)
)

0 comments on commit 019a06d

Please sign in to comment.