test_class.file: sdk/dslink/src/test/java/org/dsa/iot/dslink/util/TimeUtilsTest.java
test_class.identifier: TimeUtilsTest
test_case.body: @Test
      public void testEncoding() {
          TimeZone timeZone = TimeZone.getTimeZone("America/Los_Angeles");
          Calendar cal = make(2016,0,1,0,0,0);
          cal.setTimeZone(timeZone);
          String encoded = TimeUtils.encode(cal,false,null).toString();
          validateEqual(encoded,"2016-01-01T00:00:00.000");
          encoded = TimeUtils.encode(cal,true,null).toString();
          validateEqual(encoded,"2016-01-01T00:00:00.000-08:00");
      }
test_case.class_method_signature: TimeUtilsTest.testEncoding()
test_case.full_signature: @Test public void testEncoding()
test_case.identifier: testEncoding
test_case.invocations: getTimeZone make setTimeZone toString encode validateEqual toString encode validateEqual
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEncoding()
focal_class.declarator: calendarCache
focal_class.modifier: private static
focal_class.original_string: private static Calendar calendarCache;
focal_class.type: Calendar
focal_class.var_name: calendarCache
focal_class.declarator: MILLIS_MINUTE = 60 * 1000
focal_class.modifier: public static final
focal_class.original_string: public static final int MILLIS_MINUTE = 60 * 1000;
focal_class.type: int
focal_class.var_name: MILLIS_MINUTE
focal_class.declarator: MILLIS_HOUR = 60 * MILLIS_MINUTE
focal_class.modifier: public static final
focal_class.original_string: public static final int MILLIS_HOUR = 60 * MILLIS_MINUTE;
focal_class.type: int
focal_class.var_name: MILLIS_HOUR
focal_class.declarator: timezones = new HashMap<String, TimeZone>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<String, TimeZone> timezones = new HashMap<String, TimeZone>();
focal_class.type: Map<String, TimeZone>
focal_class.var_name: timezones
focal_class.declarator: FORMAT_TIME_ZONE
focal_class.modifier: private static final
focal_class.original_string: private static final ThreadLocal<DateFormat> FORMAT_TIME_ZONE;
focal_class.type: ThreadLocal<DateFormat>
focal_class.var_name: FORMAT_TIME_ZONE
focal_class.declarator: FORMAT
focal_class.modifier: private static final
focal_class.original_string: private static final ThreadLocal<DateFormat> FORMAT;
focal_class.type: ThreadLocal<DateFormat>
focal_class.var_name: FORMAT
focal_class.declarator: TIME_PATTERN_TZ
focal_class.modifier: private static final
focal_class.original_string: private static final String TIME_PATTERN_TZ;
focal_class.type: String
focal_class.var_name: TIME_PATTERN_TZ
focal_class.declarator: TIME_PATTERN
focal_class.modifier: private static final
focal_class.original_string: private static final String TIME_PATTERN;
focal_class.type: String
focal_class.var_name: TIME_PATTERN
focal_class.declarator: TIME_ZONE_COLON
focal_class.modifier: private static final
focal_class.original_string: private static final String TIME_ZONE_COLON;
focal_class.type: String
focal_class.var_name: TIME_ZONE_COLON
focal_class.declarator: TIME_ZONE
focal_class.modifier: private static final
focal_class.original_string: private static final String TIME_ZONE;
focal_class.type: String
focal_class.var_name: TIME_ZONE
focal_class.file: sdk/dslink/src/main/java/org/dsa/iot/dslink/util/TimeUtils.java
focal_class.identifier: TimeUtils
focal_class.class_method_signature: TimeUtils.TimeUtils()
focal_class.full_signature: private  TimeUtils()
focal_class.identifier: TimeUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  TimeUtils()
focal_class.class_method_signature: TimeUtils.getTimePatternTz()
focal_class.full_signature: public static String getTimePatternTz()
focal_class.identifier: getTimePatternTz
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getTimePatternTz()
focal_class.class_method_signature: TimeUtils.getTimePattern()
focal_class.full_signature: public static String getTimePattern()
focal_class.identifier: getTimePattern
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getTimePattern()
focal_class.class_method_signature: TimeUtils.format(long time)
focal_class.full_signature: public static String format(long time)
focal_class.identifier: format
focal_class.modifiers: public static
focal_class.parameters: (long time)
focal_class.return: String
focal_class.signature: String format(long time)
focal_class.class_method_signature: TimeUtils.format(Date time)
focal_class.full_signature: public static String format(Date time)
focal_class.identifier: format
focal_class.modifiers: public static
focal_class.parameters: (Date time)
focal_class.return: String
focal_class.signature: String format(Date time)
focal_class.class_method_signature: TimeUtils.parseTz(String time)
focal_class.full_signature: public static Date parseTz(String time)
focal_class.identifier: parseTz
focal_class.modifiers: public static
focal_class.parameters: (String time)
focal_class.return: Date
focal_class.signature: Date parseTz(String time)
focal_class.class_method_signature: TimeUtils.fixTime(String time)
focal_class.full_signature: public static String fixTime(String time)
focal_class.identifier: fixTime
focal_class.modifiers: public static
focal_class.parameters: (String time)
focal_class.return: String
focal_class.signature: String fixTime(String time)
focal_class.class_method_signature: TimeUtils.addDays(int count, Calendar timestamp)
focal_class.full_signature: public static Calendar addDays(int count, Calendar timestamp)
focal_class.identifier: addDays
focal_class.modifiers: public static
focal_class.parameters: (int count, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar addDays(int count, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.addHours(int count, Calendar timestamp)
focal_class.full_signature: public static Calendar addHours(int count, Calendar timestamp)
focal_class.identifier: addHours
focal_class.modifiers: public static
focal_class.parameters: (int count, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar addHours(int count, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.addMinutes(int count, Calendar timestamp)
focal_class.full_signature: public static Calendar addMinutes(int count, Calendar timestamp)
focal_class.identifier: addMinutes
focal_class.modifiers: public static
focal_class.parameters: (int count, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar addMinutes(int count, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.addMonths(int count, Calendar timestamp)
focal_class.full_signature: public static Calendar addMonths(int count, Calendar timestamp)
focal_class.identifier: addMonths
focal_class.modifiers: public static
focal_class.parameters: (int count, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar addMonths(int count, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.addSeconds(int count, Calendar timestamp)
focal_class.full_signature: public static Calendar addSeconds(int count, Calendar timestamp)
focal_class.identifier: addSeconds
focal_class.modifiers: public static
focal_class.parameters: (int count, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar addSeconds(int count, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.addWeeks(int count, Calendar timestamp)
focal_class.full_signature: public static Calendar addWeeks(int count, Calendar timestamp)
focal_class.identifier: addWeeks
focal_class.modifiers: public static
focal_class.parameters: (int count, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar addWeeks(int count, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.addYears(int count, Calendar timestamp)
focal_class.full_signature: public static Calendar addYears(int count, Calendar timestamp)
focal_class.identifier: addYears
focal_class.modifiers: public static
focal_class.parameters: (int count, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar addYears(int count, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignDay(Calendar timestamp)
focal_class.full_signature: public static Calendar alignDay(Calendar timestamp)
focal_class.identifier: alignDay
focal_class.modifiers: public static
focal_class.parameters: (Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignDay(Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignDays(int interval, Calendar timestamp)
focal_class.full_signature: public static Calendar alignDays(int interval, Calendar timestamp)
focal_class.identifier: alignDays
focal_class.modifiers: public static
focal_class.parameters: (int interval, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignDays(int interval, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignHour(Calendar timestamp)
focal_class.full_signature: public static Calendar alignHour(Calendar timestamp)
focal_class.identifier: alignHour
focal_class.modifiers: public static
focal_class.parameters: (Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignHour(Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignHours(int interval, Calendar timestamp)
focal_class.full_signature: public static Calendar alignHours(int interval, Calendar timestamp)
focal_class.identifier: alignHours
focal_class.modifiers: public static
focal_class.parameters: (int interval, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignHours(int interval, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignMinute(Calendar timestamp)
focal_class.full_signature: public static Calendar alignMinute(Calendar timestamp)
focal_class.identifier: alignMinute
focal_class.modifiers: public static
focal_class.parameters: (Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignMinute(Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignMinutes(int interval, Calendar timestamp)
focal_class.full_signature: public static Calendar alignMinutes(int interval, Calendar timestamp)
focal_class.identifier: alignMinutes
focal_class.modifiers: public static
focal_class.parameters: (int interval, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignMinutes(int interval, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignMonth(Calendar timestamp)
focal_class.full_signature: public static Calendar alignMonth(Calendar timestamp)
focal_class.identifier: alignMonth
focal_class.modifiers: public static
focal_class.parameters: (Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignMonth(Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignSecond(Calendar timestamp)
focal_class.full_signature: public static Calendar alignSecond(Calendar timestamp)
focal_class.identifier: alignSecond
focal_class.modifiers: public static
focal_class.parameters: (Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignSecond(Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignSeconds(int interval, Calendar timestamp)
focal_class.full_signature: public static Calendar alignSeconds(int interval, Calendar timestamp)
focal_class.identifier: alignSeconds
focal_class.modifiers: public static
focal_class.parameters: (int interval, Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignSeconds(int interval, Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignWeek(Calendar timestamp)
focal_class.full_signature: public static Calendar alignWeek(Calendar timestamp)
focal_class.identifier: alignWeek
focal_class.modifiers: public static
focal_class.parameters: (Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignWeek(Calendar timestamp)
focal_class.class_method_signature: TimeUtils.alignYear(Calendar timestamp)
focal_class.full_signature: public static Calendar alignYear(Calendar timestamp)
focal_class.identifier: alignYear
focal_class.modifiers: public static
focal_class.parameters: (Calendar timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar alignYear(Calendar timestamp)
focal_class.class_method_signature: TimeUtils.convertDigits(char tens, char ones)
focal_class.full_signature: private static int convertDigits(char tens, char ones)
focal_class.identifier: convertDigits
focal_class.modifiers: private static
focal_class.parameters: (char tens, char ones)
focal_class.return: int
focal_class.signature: int convertDigits(char tens, char ones)
focal_class.class_method_signature: TimeUtils.convertDigits(char thousands, char hundreds, char tens, char ones)
focal_class.full_signature: private static int convertDigits(char thousands, char hundreds, char tens, char ones)
focal_class.identifier: convertDigits
focal_class.modifiers: private static
focal_class.parameters: (char thousands, char hundreds, char tens, char ones)
focal_class.return: int
focal_class.signature: int convertDigits(char thousands, char hundreds, char tens, char ones)
focal_class.class_method_signature: TimeUtils.decode(String timestamp)
focal_class.full_signature: public static long decode(String timestamp)
focal_class.identifier: decode
focal_class.modifiers: public static
focal_class.parameters: (String timestamp)
focal_class.return: long
focal_class.signature: long decode(String timestamp)
focal_class.class_method_signature: TimeUtils.decode(String timestamp, Calendar calendar)
focal_class.full_signature: public static Calendar decode(String timestamp, Calendar calendar)
focal_class.identifier: decode
focal_class.modifiers: public static
focal_class.parameters: (String timestamp, Calendar calendar)
focal_class.return: Calendar
focal_class.signature: Calendar decode(String timestamp, Calendar calendar)
focal_class.class_method_signature: TimeUtils.encode(long timestamp, boolean encodeTzOffset)
focal_class.full_signature: public static StringBuilder encode(long timestamp, boolean encodeTzOffset)
focal_class.identifier: encode
focal_class.modifiers: public static
focal_class.parameters: (long timestamp, boolean encodeTzOffset)
focal_class.return: StringBuilder
focal_class.signature: StringBuilder encode(long timestamp, boolean encodeTzOffset)
focal_class.class_method_signature: TimeUtils.encode(
              Calendar calendar, boolean encodeTzOffset, StringBuilder buf)
focal_class.full_signature: public static StringBuilder encode(
              Calendar calendar, boolean encodeTzOffset, StringBuilder buf)
focal_class.identifier: encode
focal_class.modifiers: public static
focal_class.parameters: (
              Calendar calendar, boolean encodeTzOffset, StringBuilder buf)
focal_class.return: StringBuilder
focal_class.signature: StringBuilder encode(
              Calendar calendar, boolean encodeTzOffset, StringBuilder buf)
focal_class.class_method_signature: TimeUtils.recycleCalendar(Calendar cal)
focal_class.full_signature: public static void recycleCalendar(Calendar cal)
focal_class.identifier: recycleCalendar
focal_class.modifiers: public static
focal_class.parameters: (Calendar cal)
focal_class.return: void
focal_class.signature: void recycleCalendar(Calendar cal)
focal_class.class_method_signature: TimeUtils.reuseCalendar()
focal_class.full_signature: public static Calendar reuseCalendar()
focal_class.identifier: reuseCalendar
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Calendar
focal_class.signature: Calendar reuseCalendar()
focal_class.class_method_signature: TimeUtils.reuseCalendar(long timestamp)
focal_class.full_signature: public static Calendar reuseCalendar(long timestamp)
focal_class.identifier: reuseCalendar
focal_class.modifiers: public static
focal_class.parameters: (long timestamp)
focal_class.return: Calendar
focal_class.signature: Calendar reuseCalendar(long timestamp)
focal_class.class_method_signature: TimeUtils.toDigit(char ch)
focal_class.full_signature: private static int toDigit(char ch)
focal_class.identifier: toDigit
focal_class.modifiers: private static
focal_class.parameters: (char ch)
focal_class.return: int
focal_class.signature: int toDigit(char ch)
focal_class.class_method_signature: TimeUtils.validateChar(char c1, char c2)
focal_class.full_signature: private static void validateChar(char c1, char c2)
focal_class.identifier: validateChar
focal_class.modifiers: private static
focal_class.parameters: (char c1, char c2)
focal_class.return: void
focal_class.signature: void validateChar(char c1, char c2)
focal_method.body: public static StringBuilder encode(long timestamp, boolean encodeTzOffset) {
          Calendar cal = reuseCalendar(timestamp);
          StringBuilder buf = encode(cal, encodeTzOffset, new StringBuilder());
          recycleCalendar(cal);
          return buf;
      }
focal_method.class_method_signature: TimeUtils.encode(long timestamp, boolean encodeTzOffset)
focal_method.full_signature: public static StringBuilder encode(long timestamp, boolean encodeTzOffset)
focal_method.identifier: encode
focal_method.invocations: reuseCalendar encode recycleCalendar
focal_method.modifiers: public static
focal_method.parameters: (long timestamp, boolean encodeTzOffset)
focal_method.return: StringBuilder
focal_method.signature: StringBuilder encode(long timestamp, boolean encodeTzOffset)