Package java.util

Examples of java.util.TimeZone$DisplayNames


        this.timeZone = tz;
      }
      @Override
      protected Calendar initialValue() {
            if(this.timeZone != null && this.timeZone.trim().length() > 0) {
              TimeZone tz = TimeZone.getTimeZone(this.timeZone);
                if(!DEFAULT_TIME_ZONE.hasSameRules(tz)) {
                return Calendar.getInstance(tz);
                }
            }         
        return Calendar.getInstance();
View Full Code Here


    String sessionID = requestForm.getSessionID();
    HttpSession session = request.getSession();
    UserObject userobjectd = (UserObject)session.getAttribute("userobject");
    UserPrefererences userPrefs = userobjectd.getUserPref();
    TimeZone tz = TimeZone.getTimeZone(userPrefs.getTimeZone());
    Locale locale = request.getLocale();
    int individualID = userobjectd.getIndividualID();
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    // date format for writing to the form should be in the format based on
    // locale
View Full Code Here

    // First setup for all the work
    HttpSession session = request.getSession(true);
    UserObject user = (UserObject)session.getAttribute("userobject");
    int individualId = user.getIndividualID();
    TimeZone tz = TimeZone.getTimeZone((user.getUserPref()).getTimeZone());

    //UserPrefererences preferences = user.getUserPref();

    GregorianCalendar startTime = new GregorianCalendar(tz, locale);
    startTime.setTime(Calendar.getInstance().getTime());
View Full Code Here

    HttpSession session = request.getSession();
    UserObject userobjectd = (UserObject)session.getAttribute("userobject");

    // get the user's preference for sync'ing as private or default privileges
    UserPrefererences userPrefs = userobjectd.getUserPref();
    TimeZone tz = TimeZone.getTimeZone(userPrefs.getTimeZone());
    Locale locale = request.getLocale();
    String prefValue = userPrefs.getSyncAsPrivate();
    boolean syncAsPrivate = (prefValue != null && prefValue.equals("YES")) ? true : false;

    // date format for incoming dates: 2004-01-13 15:00:00
View Full Code Here

    int numChannels = Integer.parseInt(settings.getProperty("NumberOfChannels", "0"));

    mChannels = new ArrayList<Channel>();

    TimeZone timeZone = TimeZone.getTimeZone("GMT+0:00");
    for (int i = 0; i < numChannels; i++) {
      String channelName = settings.getProperty("ChannelTitle-" + i, "");
      String channelId = settings.getProperty("ChannelId-" + i, "");
      Channel ch = new Channel(this, channelName, channelId, timeZone, "gb", "(c) Radio Times", "http://www.radiotimes.co.uk", mRadioTimesChannelGroup);
      mChannels.add(ch);
View Full Code Here

        int numChannels = Integer.parseInt(settings.getProperty("NumberOfChannels", "0"));

        mChannels = new ArrayList<Channel>();

        TimeZone timeZone = TimeZone.getTimeZone("GMT+1:00");
        for (int i = 0; i < numChannels; i++) {
            Channel ch = new Channel(this, settings.getProperty("ChannelTitle-" + i, ""), settings.getProperty("ChannelId-"
                    + i, ""), timeZone, "de", "Imported from Dreambox", "", mChannelGroup, null, Channel.CATEGORY_TV);

            mChannels.add(ch);
View Full Code Here

        Calendar regular = Calendar.getInstance();
        Calendar other = null;
        // search a locale that has a _different_ raw offset
        long testTime = java.sql.Date.valueOf("2001-02-03").getTime();
        for (String s : TimeZone.getAvailableIDs()) {
            TimeZone zone = TimeZone.getTimeZone(s);
            long rawOffsetDiff = regular.getTimeZone().getRawOffset() - zone.getRawOffset();
            // must not be the same timezone (not 0 h and not 24 h difference
            // as for Pacific/Auckland and Etc/GMT+12)
            if (rawOffsetDiff != 0 && rawOffsetDiff != 1000 * 60 * 60 * 24) {
                if (regular.getTimeZone().getOffset(testTime) != zone.getOffset(testTime)) {
                    other = Calendar.getInstance(zone);
                    break;
                }
            }
        }
View Full Code Here

            }
        }
    }

    private void testCalculateLocalMillis() {
        TimeZone defaultTimeZone = TimeZone.getDefault();
        try {
            for (TimeZone tz : TestDate.getDistinctTimeZones()) {
                TimeZone.setDefault(tz);
                for (int y = 1900; y < 2039; y += 10) {
                    if (y == 1993) {
View Full Code Here

    private void testTimeOperationsAcrossTimeZones() {
        if (!SysProperties.STORE_LOCAL_TIME) {
            return;
        }
        TimeZone defaultTimeZone = TimeZone.getDefault();
        ArrayList<TimeZone> distinct = TestDate.getDistinctTimeZones();
        Data d = Data.create(null, 10240);
        try {
            for (TimeZone tz : distinct) {
                TimeZone.setDefault(tz);
View Full Code Here

     * @return the list
     */
    public static ArrayList<TimeZone> getDistinctTimeZones() {
        ArrayList<TimeZone> distinct = New.arrayList();
        for (String id : TimeZone.getAvailableIDs()) {
            TimeZone t = TimeZone.getTimeZone(id);
            for (TimeZone d : distinct) {
                if (t.hasSameRules(d)) {
                    t = null;
                    break;
                }
            }
            if (t != null) {
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.