kotlin import com.soywiz.klock.* fun main() { val now = DateTime.now() val tomorrow = now + 1.days val duration = (tomorrow - now).milliseconds val offset = TimeZone.currentOffsetLocalDateTime() val customTimeZone = TimeZone("America/New_York") val customDateTime = now.toOffset(customTimeZone) } Gradle: implementation 'com.soywiz.klock:klock:2.1.2' Maven: <dependency> <groupId>com.soywiz.klock</groupId> <artifactId>klock</artifactId> <version>2.1.2</version> </dependency>


上一篇:
下一篇:
切换中文