Search This Blog

Wednesday, May 28, 2014

New API in Java 8 to handle Date, Time and Zone

java.time (Java 8)

Java 8 brings an excellent new java.time.* package to supplant the old java.util.Date/Calendar classes.
Getting current time in UTC/GMT is a simple one-liner…
ZonedDateTime now = ZoneOffset.UTC );
Dump to console…
System.out.println( "now: " + now );
When run…
now: 2014-05-27T23:42:03.522Z
The java.time classes are defined by JSR 310. They were inspired by Joda-Time but are entirely re-architected.


  1. Designed to detect intruding drones, the system is based on real-time directional measurements (including remote control) of the electromagnetic emissions of a drone. CUAS

  2. This causes devices within the range to disconnect from the legitimate cell sites of their service providers and instead to establish a new connection to the cell site simulator. Cellular Monitoring