public static CalendarDate of ( Calendar cal , int year , int monthOfYear , int dayOfMonth , int hourOfDay , int minuteOfHour , int secondOfMinute ) { Chronology base = Calendar . getChronology ( cal ) ; /* if (base == null) base = ISOChronology.getInstanceUTC(); // already in UTC else base = ZonedChronology.getInstance( base, DateTimeZone.UTC); // otherwise wrap it to be in UTC */ DateTime dt = new DateTime ( year , monthOfYear , dayOfMonth , hourOfDay , minuteOfHour , secondOfMinute , base ) ; if ( ! Calendar . isDefaultChronology ( cal ) ) dt = dt . withChronology ( Calendar . getChronology ( cal ) ) ; dt = dt . withZone ( DateTimeZone . UTC ) ; return new CalendarDate ( cal , dt ) ; }
Get Calendar date from fields . Uses UTZ time zone