Last active
June 1, 2017 19:42
-
-
Save vpipkt/7dc0074aa92b749143921b9ad611c31f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time._ | |
import org.joda.time._ | |
val j8 = ZonedDateTime.now(ZoneId.of("Z")) | |
//j8: java.time.ZonedDateTime = 2017-06-01T19:40:54.933Z | |
val z = DateTimeZone.forOffsetMillis(j8.getOffset.getTotalSeconds * 1000) | |
//z: org.joda.time.DateTimeZone = UTC | |
val jodated = new DateTime(j8.toInstant().toEpochMilli(), z) | |
// jodated: org.joda.time.DateTime = 2017-06-01T19:40:54.933Z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment