Package java.util

Examples of java.util.TimeZone$DisplayNames


        return s;
    }

    public Sequence eval(Sequence<? extends Item> contextSeq, ValueSequence argv, DynamicContext dynEnv)
            throws XQueryException {
        TimeZone tz = dynEnv.implicitTimezone();
        int utcOffset = tz.getOffset(0);
        final Duration d = XsDatatypeFactory.createDuration(utcOffset);
        return new DurationValue(d, DayTimeDurationType.DAYTIME_DURATION);
    }
View Full Code Here


        Item first = argv.getItem(0);
        DateTimeValue arg = (DateTimeValue) first;
        XMLGregorianCalendar cal = arg.getValue();
        final long utcOffsetInMillis;
        if(arglen == 1) {
            TimeZone tz = dynEnv.implicitTimezone();
            utcOffsetInMillis = tz.getRawOffset();
        } else if(arglen == 2) {
            Item sec = argv.getItem(1);
            if(sec.isEmpty()) {
                cal.setTimezone(DatatypeConstants.FIELD_UNDEFINED);
                return arg;
View Full Code Here

    }
    if (o instanceof TimeZone == false)
    {
      throw new BeanException("Failed to convert object of type " + o.getClass() + ": Not a timezone.");
    }
    final TimeZone tz = (TimeZone) o;
    return tz.getID();
  }
View Full Code Here

    super.setFormatter(dfmt);
  }

  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

      {
        // return the default to-string behavior of java.util.Date
        formatStringRaw = "EEE MMM dd HH:mm:ss zzz yyyy";
      }
      final Locale locale = runtime.getResourceBundleFactory().getLocale();
      final TimeZone timeZone = runtime.getResourceBundleFactory().getTimeZone();
      final SimpleDateFormat dateFormat = new SimpleDateFormat(String.valueOf(formatStringRaw), locale);
      dateFormat.setDateFormatSymbols(new DateFormatSymbols(locale));
      dateFormat.setTimeZone(timeZone);
      return dateFormat.format(staticValue);
    }
View Full Code Here

    }

    try
    {
      final Locale locale = runtime.getResourceBundleFactory().getLocale();
      final TimeZone timeZone = runtime.getResourceBundleFactory().getTimeZone();
      if (dateFormat == null)
      {
        this.formatString = String.valueOf(formatStringRaw);
        this.locale = locale;
        this.timeZone = timeZone;
View Full Code Here

      }
    }
  }
 
  private Float getUptime(HttpServletRequest aRequest){
    TimeZone tz = (TimeZone)getExistingSession().getServletContext().getAttribute(Controller.TIME_ZONE);
    DateTime now = DateTime.now(tz);
    DateTime startup = getStartTime();
    int SECONDS_PER_DAY = 86400;
    return new Float(startup.numSecondsFrom(now)/SECONDS_PER_DAY);
  }
View Full Code Here

        LOG.log(Level.FINE, "server sending reply: ", reply);

        long timeToLive = 0;
        if (request.getJMSExpiration() > 0) {
            TimeZone tz = new SimpleTimeZone(0, "GMT");
            Calendar cal = new GregorianCalendar(tz);
            timeToLive =  request.getJMSExpiration() - cal.getTimeInMillis();
        }
       
        if (timeToLive >= 0) {
View Full Code Here

        String iCalFormat   = null;
        int    startPoint   = 0;
        String tzName       = null;

        TimeZone offsetZone = java.util.TimeZone.getDefault();

        if (iCalString.startsWith("TZID=")){
            // Time for a specific Time Zone
            startPoint = iCalString.indexOf(":") + 1;
            // Get timezone.
View Full Code Here

        return date;
    }

    public TimeZone getTimeZoneFromDate(String iCalString, int startPoint)
    {
        TimeZone tz = null;
        try {
            String tzName = null;
            if (iCalString.indexOf("TZID=/softwarestudio.org/Olson_20011030_5/") != -1)
            {
                tzName = iCalString.substring("TZID=/softwarestudio.org/Olson_20011030_5/".length(),startPoint -1);
View Full Code Here

TOP

Related Classes of java.util.TimeZone$DisplayNames

Copyright © 2018 www.massapicom. 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.