List of usage examples for org.joda.time MutableDateTime now
public static MutableDateTime now(Chronology chronology)
From source file:com.edlogics.ElrcApplication.java
License:Open Source License
/** * Bean to hold the system maintenance date time. Defaults to a far future date time. * * @return//from ww w. j a v a 2 s . c o m */ @Bean public MutableDateTime maintenanceDateTime() { MutableDateTime farFuture = MutableDateTime.now(DateTimeZone.forID(elrcTimezone)); // Set to year 9999 to make easy to check for far future value // There is no easy way to do a max Date with Joda time so this is the workaround farFuture.setYear(9999); return farFuture; }
From source file:org.obp.utils.TimeUtil.java
License:Apache License
public static final long fromUtcHHMMSS(double time) { int hhmmss = (int) time; MutableDateTime mdt = MutableDateTime.now(DateTimeZone.UTC); mdt.setSecondOfMinute(hhmmss % 100); mdt.setMinuteOfHour((hhmmss / 100) % 100); mdt.setHourOfDay(hhmmss / 10000);/*from w ww. j a v a 2s .c o m*/ mdt.setMillisOfSecond((int) ((time - hhmmss) * 1000)); return mdt.toDateTime().getMillis(); }