How to covert time based java.util.UUID to DateTIme -


i'm using com.datastax.driver.core.utils.uuids generate time based uuid can't convert date time:

i tried using org.joda.time other package fine.

new org.joda.time.datetime(com.datastax.driver.core.utils.uuids.timebased.timestamp) // 4328915-05-22t15:34:30.000+00:00 new org.joda.time.datetime()  //2015-06-25t13:28:07.249+00:00 

as can see uuidjavadoc, resulting timestamp measured in 100-nanosecond units since midnight, october 15, 1582 utc.

org.joda.time.datetime(long instant) expects timestamp in milliseconds since 1970-01-01t00:00:00z, see javadoc .


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -