Here you can find the source of getTimeZoneId(final TimeZone tz)
Parameter | Description |
---|---|
tz | a parameter |
public static ZoneId getTimeZoneId(final TimeZone tz)
//package com.java2s; /**//from www .ja v a 2s . c o m * Copyright (c) 2015 Bosch Software Innovations GmbH 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 */ import java.time.ZoneId; import java.util.TimeZone; public class Main { /** * Get time zone id .ZoneId.SHORT_IDS used get id if time zone is * abbreviated like 'IST'. * * @param tz * @return ZoneId */ public static ZoneId getTimeZoneId(final TimeZone tz) { return ZoneId.of(tz.getID(), ZoneId.SHORT_IDS); } }