예제 #1
0
  public String format(String format) {
    long time = _qDate.getGMTTime() / 1000;

    QDate calendar = new QDate(_qDate.getLocalTimeZone());

    return DateModule.dateImpl(format, time, calendar);
  }
예제 #2
0
  public void setTimeZone(Env env, DateTimeZone dateTimeZone) {
    _dateTimeZone = dateTimeZone;

    long time = _qDate.getGMTTime();

    _qDate = new QDate(dateTimeZone.getTimeZone(), env.getCurrentTime());
    _qDate.setGMTTime(time);
  }
예제 #3
0
  private void init(Env env, String timeString) {
    long now = env.getCurrentTime();
    _qDate.setGMTTime(now);

    if (timeString.equals("")) {
      _qDate.setHour(0);
      _qDate.setMinute(0);
      _qDate.setSecond(0);
    }

    DateParser parser = new DateParser(timeString, _qDate);

    long time = parser.parse();

    _qDate.setGMTTime(time);
  }
예제 #4
0
 protected void setTime(long time) {
   _qDate.setLocalTime(time);
 }
예제 #5
0
 protected long getTime() {
   return _qDate.getLocalTime();
 }
예제 #6
0
 public void setDate(int year, int month, int day) {
   _qDate.setDate(year, month - 1, day);
 }
예제 #7
0
 public void setTime(int hour, int minute, @Optional int second) {
   _qDate.setTime(hour, minute, second, 0);
 }
예제 #8
0
 public long getOffset() {
   return _qDate.getZoneOffset() / 1000;
 }