UTCTime { @SuppressWarnings("SSBasedInspection") @Nonnull public static DateTime now() { return DateTime.now().withZone(DateTimeZone.UTC); } private  UTCTime(); @SuppressWarnings("SSBasedInspection") @Nonnull static DateTime now(); @Nonnull static DateTime from(@Nonnull final DateTime time); @Nonnull static DateTime from(@Nonnull final Date time); @Nonnull static DateTime parse(@Nonnull final String str); static int dateTimeToUTCTimestamp(@Nonnull final DateTime dateTime); static final DateTime MIN_TIMESTAMP_DATE; static final DateTime MAX_TIMESTAMP_DATE; }
@SuppressWarnings("SSBasedInspection") @Test public void testNow() { LOG.info("testNow"); final DateTime t1 = DateTime.now().withZone(DateTimeZone.UTC); final DateTime t2 = UTCTime.now(); Assert.assertEquals(t1.getMillis(), t2.getMillis(), 100); }