Package org.joda.time.format

Examples of org.joda.time.format.DateTimeFormatter.withZone()


    {
      TimeZone zone = getClientTimeZone();
      if (zone != null)
      {
        // apply time zone to formatter
        format = format.withZone(DateTimeZone.forTimeZone(zone));
      }
    }
    return format.print(dt);
  }
View Full Code Here


    else if (StringUtils.hasLength(style)) {
      dateTimeFormatter = DateTimeFormat.forStyle(style);
    }

    if (dateTimeFormatter != null && this.timeZone != null) {
      dateTimeFormatter = dateTimeFormatter.withZone(DateTimeZone.forTimeZone(this.timeZone));
    }
    return (dateTimeFormatter != null ? dateTimeFormatter : fallbackFormatter);
  }

  /**
 
View Full Code Here

      // instantiate now/ current time
      MutableDateTime dt = new MutableDateTime(new DateMidnight());
      if (zone != null)
      {
        // set time zone for client
        format = format.withZone(DateTimeZone.forTimeZone(zone));
        dt.setZone(DateTimeZone.forTimeZone(zone));
      }
      try
      {
        // parse date retaining the time of the submission
View Full Code Here

      // instantiate now/ current time
      MutableDateTime dt = new MutableDateTime(new DateMidnight());
      if (zone != null)
      {
        // set time zone for client
        format = format.withZone(DateTimeZone.forTimeZone(zone));
        dt.setZone(DateTimeZone.forTimeZone(zone));
      }
      try
      {
        // parse date retaining the time of the submission
View Full Code Here

    {
      TimeZone zone = getClientTimeZone();
      if (zone != null)
      {
        // apply time zone to formatter
        format = format.withZone(DateTimeZone.forTimeZone(zone));
      }
    }
    return format.print(dt);
  }
View Full Code Here

      } else {
        s = "XXXX-XX-XX";
      }
      if (dateTimeZone != null) {
        DateTimeFormatter formatter = DateTimeFormat.forPattern("Z");
        formatter = formatter.withZone(dateTimeZone);
        s = s + formatter.print(0);
      }
      return s;
    }
View Full Code Here

        }
        DateTimeFormatter dtf = DateTimeFormat.forPattern(DataType
                .toString(input.get(1)));
        DateTimeZone dtz = DateTimeZone.forOffsetMillis(DateTimeZone.forID(
                DataType.toString(input.get(2))).getOffset(null));
        return dtf.withZone(dtz).parseDateTime(DataType.toString(input.get(0)));
    }

    @Override
    public boolean allowCompileTimeCalculation() {
        return true;
View Full Code Here

      // instantiate now/ current time
      MutableDateTime dt = new MutableDateTime(new DateMidnight());
      if (zone != null)
      {
        // set time zone for client
        format = format.withZone(DateTimeZone.forTimeZone(zone));
        dt.setZone(DateTimeZone.forTimeZone(zone));
      }
      try
      {
        // parse date retaining the time of the submission
View Full Code Here

    {
      TimeZone zone = getClientTimeZone();
      if (zone != null)
      {
        // apply time zone to formatter
        format = format.withZone(DateTimeZone.forTimeZone(zone));
      }
    }
    return format.print(dt);
  }
View Full Code Here

        }
        DateTimeFormatter dtf = DateTimeFormat.forPattern(DataType
                .toString(input.get(1)));
        DateTimeZone dtz = DateTimeZone.forOffsetMillis(DateTimeZone.forID(
                DataType.toString(input.get(2))).getOffset(null));
        return dtf.withZone(dtz).parseDateTime(DataType.toString(input.get(0)));
    }

}
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.