Examples of QDate


Examples of com.caucho.util.QDate

    if (value == null || value.length() == 0)
      return null;

    try {
      QDate qDate = _freeDate.allocate();

      if (qDate == null)
        qDate = new QDate();

      long date = qDate.parseLocalDate(value);

      _freeDate.free(qDate);

      return new Timestamp(date);
    } catch (Exception e) {
View Full Code Here

Examples of com.caucho.util.QDate

        if (status.equals("200")) {
          String lastModified = (String) stream.getAttribute("last-modified");

          _cacheEntry.lastModified = 0;
          if (lastModified != null) {
            QDate date = QDate.getGlobalDate();
            synchronized (date) {
              _cacheEntry.lastModified = date.parseDate(lastModified);
            }
          }

          String length =  (String) stream.getAttribute("content-length");
          _cacheEntry.length = 0;
View Full Code Here

Examples of com.caucho.util.QDate

        if (status.equals("200")) {
          String lastModified = (String) stream.getAttribute("last-modified");

          _cacheEntry.lastModified = 0;
          if (lastModified != null) {
            QDate date = QDate.getGlobalDate();
            synchronized (date) {
              _cacheEntry.lastModified = date.parseDate(lastModified);
            }
          }

          String length =  (String) stream.getAttribute("content-length");
          _cacheEntry.length = 0;
View Full Code Here

Examples of com.caucho.util.QDate

  public static String createArchiveTag(String host,
                                        String name,
                                        String version)
  {
    QDate qDate = new QDate();
    long time = qDate.getTimeOfDay() / 1000;

    StringBuilder sb = new StringBuilder();

    sb.append(createTag("archive", host, name, version));

    sb.append('/');

    sb.append(qDate.printISO8601Date());

    sb.append('T');
    sb.append((time / 36000) % 10);
    sb.append((time / 3600) % 10);
View Full Code Here

Examples of com.caucho.util.QDate

    long lastModified = getLastModified(req);

    if (lastModified > 0) {
      if (_calendar == null)
        _calendar = new QDate();

      String etag = _etag;
      if (lastModified != _lastModified) {
        CharBuffer cb = new CharBuffer();
        cb.append('"');
View Full Code Here

Examples of com.caucho.util.QDate

   *
   * @return the time of the next period in GMT ms since the epoch
   */
  public static long periodEnd(long now, long period)
  {
    QDate localCalendar = QDate.allocateLocalDate();
   
    long endTime = periodEnd(now, period, localCalendar);
   
    QDate.freeLocalDate(localCalendar);
   
View Full Code Here

Examples of com.caucho.util.QDate

    else
      now = System.currentTimeMillis();

    StringBuilder sb = new StringBuilder();

    QDate localDate = QDate.allocateLocalDate();

    localDate.setGMTTime(now);
   
    int len = _timestamp.length;
    for (int j = 0; j < len; j++) {
      _timestamp[j].format(sb, localDate, log);
    }
View Full Code Here

Examples of com.caucho.util.QDate

  }

  public ESBase construct(Call eval, int length) throws Throwable
  {
    if (cal == null)
      cal = new QDate();

    if (n != NEW)
      return super.construct(eval, length);
   
    synchronized (cal) {
View Full Code Here

Examples of com.caucho.util.QDate

      if (! _isLineBegin) {
      }
      else if (_isRecordBegin) {
  long start = _stream.getPosition();
 
  QDate localDate = QDate.allocateLocalDate();

  localDate.setGMTTime(now);
   
  int len = _timestamp.length;
  for (int j = 0; j < len; j++) {
    _timestamp[j].print(_stream, localDate);
  }
View Full Code Here

Examples of com.caucho.util.QDate

    // Jump to start time.
    if ((_start != -1) && (now < _start)) {
      now = _start;
    }

    QDate calendar = allocateCalendar();

    // Round up to seconds.
    long time = now + 1000 - now % 1000;

    calendar.setGMTTime(time);

    QDate nextTime = getNextTime(calendar);

    if (nextTime != null) {
      time = nextTime.getGMTTime();
      time -= _timezone.getRawOffset(); // Adjust for time zone specification.
    } else {
      time = Long.MAX_VALUE; // This trigger is inactive.
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.