Ejemplo n.º 1
0
  public String format(String format) {
    long time = _qDate.getGMTTime() / 1000;

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

    return DateModule.dateImpl(format, time, calendar);
  }
Ejemplo n.º 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);
  }
Ejemplo n.º 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);
  }
Ejemplo n.º 4
0
 protected void setTime(long time) {
   _qDate.setLocalTime(time);
 }
Ejemplo n.º 5
0
 protected long getTime() {
   return _qDate.getLocalTime();
 }
Ejemplo n.º 6
0
 public void setDate(int year, int month, int day) {
   _qDate.setDate(year, month - 1, day);
 }
Ejemplo n.º 7
0
 public void setTime(int hour, int minute, @Optional int second) {
   _qDate.setTime(hour, minute, second, 0);
 }
Ejemplo n.º 8
0
 public long getOffset() {
   return _qDate.getZoneOffset() / 1000;
 }