timetable/module-server/src/main/kotlin/de/twomartens/timetable/support/configuration/ClockConfiguration.kt

15 lines
436 B
Kotlin

package de.twomartens.timetable.support.configuration
import de.twomartens.timetable.property.TimeProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import java.time.Clock
@Configuration
open class ClockConfiguration(private val properties: TimeProperties) {
@Bean
open fun clock(): Clock {
return Clock.system(properties.defaultTimeZone)
}
}