Package java.util

Examples of java.util.TimeZone$DisplayNames


    {
        String retval = null;
        if( date != null )
        {
            StringBuffer buffer = new StringBuffer();
            TimeZone zone = date.getTimeZone();
            long offsetInMinutes = zone.getOffset( date.getTimeInMillis() )/1000/60;
            long hours = Math.abs( offsetInMinutes/60 );
            long minutes = Math.abs( offsetInMinutes%60 );
            buffer.append( "D:" );
            buffer.append( PDF_DATE_FORMAT.format( date.getTime() ) );
            if( offsetInMinutes == 0 )
View Full Code Here


   * @param cal
   * @return String
   */
  public static String calendarToString(Calendar cal) {
    Calendar now = Calendar.getInstance();
    TimeZone tz = now.getTimeZone();
    int offset = tz.getRawOffset();

    if (tz.inDaylightTime(now.getTime())) {
      offset -= tz.getDSTSavings();
    }

    if (tz.inDaylightTime(cal.getTime())) {
      offset += tz.getDSTSavings();
    }

    Date d = new Date(cal.getTimeInMillis() - offset);
    return new SimpleDateFormat("yyyy-MM-dd").format(d); //$NON-NLS-1$
  }
View Full Code Here

  {
    CronExpression cronExpression = new CronExpression(schedule.getSecond(),
        schedule.getMinute(), schedule.getHour(), schedule.getDayOfWeek(),
        schedule.getDayOfMonth(), schedule.getMonth(), schedule.getYear());

    TimeZone timezone = null;

    if (!schedule.getTimezone().trim().equals("")) {
      timezone = TimeZone.getTimeZone(schedule.getTimezone());
    }
View Full Code Here

    PageContextImpl pc = (PageContextImpl) pageContext;

    _oldTimeZone = pc.getAttribute("com.caucho.time-zone");

    Object valueObj = _value;
    TimeZone timeZone = null;

    if (valueObj instanceof TimeZone) {
      timeZone = (TimeZone) valueObj;
    }
    else if (valueObj instanceof String) {
View Full Code Here

  public int doStartTag()
    throws JspException
  {
    PageContextImpl pc = (PageContextImpl) pageContext;

    TimeZone timeZone = null;

    if (_value instanceof TimeZone) {
      timeZone = (TimeZone) _value;
    }
    else if (_value instanceof String) {
View Full Code Here

      } catch (ClassCastException e) {
        format = new SimpleDateFormat(_pattern, locale);
      }
    }
   
    TimeZone timeZone = getTimeZone(_timeZone);

    if (timeZone == null)
      timeZone = (TimeZone) pageContext.getAttribute("com.caucho.time-zone");
       
    if (timeZone == null)
View Full Code Here

          format = new SimpleDateFormat(_pattern, locale);
        }
      }

      if (format != null) {
        TimeZone timeZone = getTimeZone(_timeZone);

        if (timeZone == null)
          timeZone = (TimeZone) pageContext.getAttribute("com.caucho.time-zone");
       
        if (timeZone == null)
View Full Code Here

      } catch (ClassCastException e) {
        format = new SimpleDateFormat(pattern, locale);
      }
    }
   
    TimeZone timeZone = getTimeZone();
    if (timeZone != null)
      format.setTimeZone(timeZone);

    return format;
  }
View Full Code Here

  {
    if (_timeZoneExpr != null) {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;
      Object timeZoneObj = _timeZoneExpr.evalObject(pageContext.getELContext());

      TimeZone zone = getTimeZone(timeZoneObj);
      if (zone != null)
        return zone;
    }

    Object timeZoneObj = pageContext.getAttribute("com.caucho.time-zone");
View Full Code Here

  {
    try {
      PageContextImpl pageContext = (PageContextImpl) this.pageContext;

      Object valueObj = _valueExpr.evalObject(pageContext.getELContext());
      TimeZone timeZone = null;

      if (valueObj instanceof TimeZone) {
        timeZone = (TimeZone) valueObj;
      }
      else if (valueObj instanceof String) {
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.