UTCTime { @Nonnull public static DateTime from(@Nonnull final DateTime time) { assert time != null; return time.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 testFrom() { LOG.info("testFrom"); final DateTime t1 = DateTime.now(); final DateTime t2 = UTCTime.from(t1); Assert.assertEquals(t1.getMillis(), t2.getMillis()); }