interledger-deprecated / java-ilp-core

WE'VE MOVED: This project has moved to Hyperledger Quilt
https://github.com/hyperledger/quilt/tree/master/ilp-core
Apache License 2.0
16 stars 10 forks source link

Use java.time.Instant instead of ZonedDateTime #77

Closed sappenin closed 6 years ago

sappenin commented 7 years ago

java.time.Instant will always be created using a fixed clock based off the epoch in UTC. We should consider moving to this object in order to enforce a consistent Timezone in our library.

For library users who want something more time-zone centric, Instant's can be trivially converted to ZonedDateTime or other java.time classes, like so:

Instant instant = Instant.now();
ZonedDateTime zdt = instant.atZone(ZoneId.of("PST"));