Java TimeZone Usage isKeepTimeZone(TimeZone tz)

Here you can find the source of isKeepTimeZone(TimeZone tz)

Description

is Keep Time Zone

License

Open Source License

Declaration

private static boolean isKeepTimeZone(TimeZone tz) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2010, 2011 LogSaw project and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:/*ww w  . j a va  2 s . c  o  m*/
 *    LogSaw project committers - initial API and implementation
 *******************************************************************************/

import java.util.TimeZone;

public class Main {
    private static boolean isKeepTimeZone(TimeZone tz) {
        if (tz.getID().startsWith("Africa")) { //$NON-NLS-1$
            return true;
        } else if (tz.getID().startsWith("America")) { //$NON-NLS-1$
            return true;
        } else if (tz.getID().startsWith("Antarctica")) { //$NON-NLS-1$
            return true;
        } else if (tz.getID().startsWith("Asia")) { //$NON-NLS-1$
            return true;
        } else if (tz.getID().startsWith("Atlantic")) { //$NON-NLS-1$
            return true;
        } else if (tz.getID().startsWith("Australia")) { //$NON-NLS-1$
            return true;
        } else if (tz.getID().startsWith("Europe")) { //$NON-NLS-1$
            return true;
        } else if (tz.getID().startsWith("Indian")) { //$NON-NLS-1$
            return true;
        } else if (tz.getID().startsWith("Pacific")) { //$NON-NLS-1$
            return true;
        }
        return false;
    }
}

Related

  1. createPostgresTimeZone()
  2. createTaiTimeZone(int leapSecs)
  3. datePlusDays(Date date, int days)
  4. findTimeZoneInDate(String date)
  5. isInEasternEightZones()
  6. isSameDayOfMillis(final long ms1, final long ms2)
  7. isTimeZoneDisponible(TimeZone timeZone)
  8. isValidTimeZone(final String timeZone)
  9. isValidTimezone(String tz)