long function ( Calendar arg0 ) { int loc0 = arg0 . get ( Calendar . HOUR_OF_DAY ) ; int loc1 = arg0 . get ( Calendar . MINUTE ) ; int loc2 = arg0 . get ( Calendar . SECOND ) ; int loc3 = arg0 . get ( Calendar . MILLISECOND ) ; return ( ( ( ( ( ( loc0 * 60L ) + loc1 ) * 60 ) + loc2 ) * 1000 ) + loc3 ) * 1000000 ; }
calculate the nanoseconds since midnight from a given calendar . copy/pasted from org.h2.util.datetimeutils #nanosfromcalendar java.util.calendar . concode_field_sep Calendar staticCalendar concode_elem_sep int SHIFT_YEAR concode_elem_sep int SHIFT_MONTH concode_elem_sep ThreadLocal<Calendar> localCalendar concode_field_sep long dateValueFromCalendar concode_elem_sep int getYear concode_elem_sep Calendar getLocalCalendar concode_elem_sep ValueTimestamp toValueTimestamp