Package java.util

Examples of java.util.TimeZone$DisplayNames


     */
    public Calendar getCalendarForDateTimezone()
    {
        if (dateTimezoneCalendar == null)
        {
            TimeZone tz;
            String serverTimeZoneID = getStringProperty("datanucleus.ServerTimeZoneID");
            if (serverTimeZoneID != null)
            {
                tz = TimeZone.getTimeZone(serverTimeZoneID);
            }
View Full Code Here


        if (seconds == sessionTimeZoneSeconds) {
            calendar        = null;
            timeZoneSeconds = sessionTimeZoneSeconds;
        } else {
            TimeZone zone = TimeZone.getDefault();

            zone.setRawOffset(seconds * 1000);

            calendar        = new GregorianCalendar(zone);
            timeZoneSeconds = seconds;
        }
    }
View Full Code Here

        if (calendar == null) {
            if (zoneString == null) {
                calendar = new GregorianCalendar();
            } else {
                TimeZone zone = TimeZone.getTimeZone(zoneString);

                calendar = new GregorianCalendar(zone);
            }
        }
View Full Code Here

            }
           
          }
         
          jNameTimeZone = omTimeZone.getIcal();
          TimeZone timeZone = TimeZone.getTimeZone(jNameTimeZone);
         
          Calendar cal = Calendar.getInstance();
          cal.setTimeZone(timeZone);
          int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
         
View Full Code Here

    try {
     
      String[] ids = TimeZone.getAvailableIDs();
        for (String id : ids) {
         
          TimeZone timeZone = TimeZone.getTimeZone(id);
          //TimeZone timeZone = timeRegistry.getTimeZone(id);
         
          Calendar cal = Calendar.getInstance();
        cal.setTimeZone(timeZone);
        // + cal.get(Calendar.DST_OFFSET)
View Full Code Here

  }
 
  public void testGetIds() {
    try {
     
      TimeZone timeZone = TimeZone.getTimeZone("Etc/GMT+1");
     
      Calendar cal = Calendar.getInstance();
      cal.setTimeZone(timeZone);
      int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
     
View Full Code Here

                FastDateFormat.getInstance("yyyy/MM/dd HH:mm:ss.SSS z");
        }
        else if (format instanceof SimpleDateFormat) {
            SimpleDateFormat simple = (SimpleDateFormat)format;
            String pattern = simple.toPattern();
            TimeZone timeZone = simple.getTimeZone();
            DateFormatSymbols symbols = simple.getDateFormatSymbols();
            mFastFormat =
                FastDateFormat.getInstance(pattern, timeZone, null, symbols);
        }
    }
View Full Code Here

                return 40;
            }
        }

        public void appendTo(StringBuffer buffer, Calendar calendar) {
            TimeZone timeZone;
            if ((timeZone = mTimeZone) != null) {
                if (timeZone.useDaylightTime() &&
                    calendar.get(Calendar.DST_OFFSET) != 0) {

                    buffer.append(mDaylight);
                }
                else {
                    buffer.append(mStandard);
                }
            }
            else {
                timeZone = calendar.getTimeZone();
                if (timeZone.useDaylightTime() &&
                    calendar.get(Calendar.DST_OFFSET) != 0) {

                    buffer.append(getTimeZoneDisplay
                                  (timeZone, true, mStyle, mLocale));
                }
View Full Code Here

        Appointment appStored = AppointmentDaoImpl.getInstance().getAppointmentByRoomId(
                              users_id, room_id);

        Users user = Usermanagement.getInstance().getUserById(users_id);
       
        TimeZone timeZone = TimeZone.getTimeZone(user.getOmTimeZone().getIcal());
       
        Calendar cal = Calendar.getInstance();
        cal.setTimeZone(timeZone);
        int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
       
View Full Code Here

  /**
   * Test the formatting.
   */
  public void testFormat() {
    TimeZone tz = TimeZone.getTimeZone("GMT+01");
    Calendar cal = Calendar.getInstance(tz);
    cal.set(1962, Calendar.JANUARY, 19, 8, 40, 0);
    ISO8601DateTimeFormat formatter = new ISO8601DateTimeFormat(tz);

    String res = formatter.format(cal.getTime());
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.