Created
July 18, 2017 20:59
-
-
Save EwanDawson/ca0f82028fed9e0ed40686ddf46692f7 to your computer and use it in GitHub Desktop.
Convert a date into the number of nanoseconds elapsed from January 1, 1970 UTC to that date
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.Instant | |
def instant = Instant.parse(payload[0] as String) | |
instant.epochSecond * 1e9 + instant.nano |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment