Exemple #1
0
  /**
   * Formats a time in the local time zone.
   *
   * @param time in milliseconds, GMT, from the epoch.
   * @param format formatting string.
   */
  public static synchronized CharBuffer formatLocal(CharBuffer cb, long gmtTime, String format) {
    _localDate.setGMTTime(gmtTime);

    return _localDate.format(cb, format);
  }
Exemple #2
0
  /**
   * Formats a time in the local time zone.
   *
   * @param time in milliseconds, GMT, from the epoch.
   * @param format formatting string.
   */
  public static synchronized String formatLocal(long gmtTime, String format) {
    _localDate.setGMTTime(gmtTime);

    return _localDate.format(new CharBuffer(), format).toString();
  }