Examples of TimeZone


Examples of java.util.TimeZone

   */
  public void changeTimeZoneOfAllDates(String currentTimeZone, String newTimeZone)
  {
    logger.debug("start ts before changing timezone: "+this.getActivityStartDate().toString());
    logger.debug("end ts before changing timezone: "+this.getActivityEndDate().toString());
    TimeZone currentTZ = TimeZone.getTimeZone(currentTimeZone);
    TimeZone targetTZ = TimeZone.getTimeZone(newTimeZone);
    if (this.getActivityStartDate() != null) {
      this.setActivityStartDate(CVUtility.convertTimeZone(this.getActivityStartDate(), currentTZ, targetTZ));
    } //end of if statement (this.getActivityStartDate() != null)
    if (this.getActivityEndDate() != null) {
      this.setActivityEndDate(CVUtility.convertTimeZone(this.getActivityEndDate(), currentTZ, targetTZ));
View Full Code Here

Examples of java.util.TimeZone

    Collection v = cvdl.executeQuery();
    cvdl.clearParameters();
    cvdl.destroy();

    Iterator it           = v.iterator();
    TimeZone tz           = TimeZone.getTimeZone("IST");
    int i                 = 0;

    while (it.hasNext())
    {
      i++;
View Full Code Here

Examples of java.util.TimeZone

  {
    if (!(o instanceof TimeZone))
    {
      throw new ObjectFactoryException("The given object is no java.util.TimeZone. ");
    }
    final TimeZone t = (TimeZone) o;
    setParameter("value", t.getID());
  }
View Full Code Here

Examples of java.util.TimeZone

    }

    final String formatString = entry.getParameterAttribute(ParameterAttributeNames.Core.NAMESPACE,
        ParameterAttributeNames.Core.DATA_FORMAT, parameterContext);
    final Locale locale = parameterContext.getResourceBundleFactory().getLocale();
    final TimeZone timeZone = parameterContext.getResourceBundleFactory().getTimeZone();

    sdf = createDateFormat(formatString, locale, timeZone);

    dateChooserPanel = new DateChooserPanel(Calendar.getInstance(), true);
    dateChooserPanel.addPropertyChangeListener(DateChooserPanel.PROPERTY_DATE, new InternalDateUpdateHandler());
View Full Code Here

Examples of java.util.TimeZone

    this.parameterName = entry.getName();

    final String formatString = entry.getParameterAttribute(ParameterAttributeNames.Core.NAMESPACE,
        ParameterAttributeNames.Core.DATA_FORMAT, parameterContext);
    final Locale locale = parameterContext.getResourceBundleFactory().getLocale();
    final TimeZone timeZone = parameterContext.getResourceBundleFactory().getTimeZone();

    final Format format =
        TextComponentEditHandler.createFormat(formatString, locale, timeZone, entry.getValueType());

    handler =
View Full Code Here

Examples of java.util.TimeZone

    this.updateContext = updateContext;

    final String formatString = entry.getParameterAttribute(ParameterAttributeNames.Core.NAMESPACE,
        ParameterAttributeNames.Core.DATA_FORMAT, parameterContext);
    final Locale locale = parameterContext.getResourceBundleFactory().getLocale();
    final TimeZone timeZone = parameterContext.getResourceBundleFactory().getTimeZone();

    final Format format =
        TextComponentEditHandler.createFormat(formatString, locale, timeZone, entry.getValueType());

    textArea = new JTextArea();
View Full Code Here

Examples of java.util.TimeZone

        long nanos;
        if (timeStart < 0) {
            nanos = 0;
        } else {
            int timeEnd = s.length();
            TimeZone tz = null;
            if (s.endsWith("Z")) {
                tz = TimeZone.getTimeZone("UTC");
                timeEnd--;
            } else {
                int timeZoneStart = s.indexOf('+', dateEnd);
                if (timeZoneStart < 0) {
                    timeZoneStart = s.indexOf('-', dateEnd);
                }
                if (timeZoneStart >= 0) {
                    String tzName = "GMT" + s.substring(timeZoneStart);
                    tz = TimeZone.getTimeZone(tzName);
                    if (!tz.getID().startsWith(tzName)) {
                        throw new IllegalArgumentException(tzName);
                    }
                    timeEnd = timeZoneStart;
                } else {
                    timeZoneStart = s.indexOf(' ', dateEnd + 1);
                    if (timeZoneStart > 0) {
                        String tzName = s.substring(timeZoneStart + 1);
                        tz = TimeZone.getTimeZone(tzName);
                        if (!tz.getID().startsWith(tzName)) {
                            throw new IllegalArgumentException(tzName);
                        }
                        timeEnd = timeZoneStart;
                    }
                }
View Full Code Here

Examples of java.util.TimeZone

    return value;
  }

  public Object getValue(final ExpressionRuntime runtime, final Element element)
  {
    final TimeZone timeZone = runtime.getResourceBundleFactory().getTimeZone();
    if (ObjectUtilities.equal(timeZone, this.timeZone) == false)
    {
      this.timeZone = timeZone;
      getDateFormat().setTimeZone(timeZone);
    }
View Full Code Here

Examples of java.util.TimeZone

        assertEquals(a1, props.getInetAddress("a1", a3));
        assertEquals(a3, props.getInetAddress("foo", a3));
    }

    public void testGetTimeZone() throws FtpException {
        TimeZone tz1 = TimeZone.getTimeZone("PST");
        TimeZone tz2 = TimeZone.getTimeZone("GMT-8:00");
        TimeZone tz3 = TimeZone.getTimeZone("foo");

        BaseProperties props = new BaseProperties();
        props.setProperty("tz1", "PST");
        props.setProperty("tz2", "GMT-8:00");
        props.setProperty("tz3", "foo");
View Full Code Here

Examples of java.util.TimeZone

        assertEquals(tz1, props.getTimeZone("tz1", tz2));
        assertEquals(tz2, props.getTimeZone("foo", tz2));
    }

    public void testSetTimeZone() throws FtpException {
        TimeZone tz1 = TimeZone.getTimeZone("PST");

        BaseProperties props = new BaseProperties();
        props.setProperty("tz1", tz1);

        assertEquals(tz1, props.getTimeZone("tz1"));
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.