/** * returns an array of short with all the fields that describe this time type. * <p> * Note:the time zone is not included. * * @return an array of short with all the fields that describe this time type. */ public short[] getValues() { short[] result = new short[4]; result[0] = this.getHour(); result[1] = this.getMinute(); result[2] = this.getSeconds(); result[3] = this.getMilli(); return result; } // getValues
/** * returns an array of short with all the fields that describe * this time type. * <p>Note:the time zone is not included. * @return an array of short with all the fields that describe * this time type. */ public short[] getValues() { short[] result = new short[4]; result[0] = this.getHour(); result[1] = this.getMinute(); result[2] = this.getSeconds(); result[3] = this.getMilli(); return result; } //getValues
Time temp = Time.parseTime(value.toString()) ; timeTarget.setHour(temp.getHour()); timeTarget.setMinute(temp.getMinute()); timeTarget.setSecond(temp.getSeconds(), temp.getMilli()); if (temp.isUTC()) {
Time temp = Time.parseTime(value.toString()); timeTarget.setHour(temp.getHour()); timeTarget.setMinute(temp.getMinute()); timeTarget.setSecond(temp.getSeconds(), temp.getMilli()); if (temp.isUTC()) {
/** * Converts this Time instance into a long value based on UTC time zone. * * @return A long value representing this Time instance. */ public long toLong() { int sign = isZoneNegative() ? 1 : -1; int hour = getHour() + sign * getZoneHour(); int minute = getMinute() + sign * getZoneMinute(); int second = getSeconds(); int milli = getMilli(); if (minute < 0) { minute = minute + 60; hour = hour - 1; } else if (minute > 59) { minute = minute - 60; hour = hour + 1; } if (hour < 0) { hour = hour + 24; } else if (hour > 23) { hour = hour - 24; } return 3600000 * hour + 60000 * minute + 1000 * second + milli; }