Here you can find the source of addTimeZone(String id, double off)
Parameter | Description |
---|---|
String | - identifier of time zone |
private static SimpleTimeZone addTimeZone(String id, double off)
//package com.java2s; /**/*from www . ja va2s .c om*/ * Copyright (c) 2005, 2011, Werner Keil, Ikayzo 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: * Werner Keil - initial API and implementation */ import java.util.*; public class Main { static HashMap<String, SimpleTimeZone> s_timeZoneTable = null; /** * Add a java.util.SimpleTimeZone * * @param String * - identifier of time zone * @param double - hours to be added to UTC to get local time (may be * fractional) * @return SimpleTimeZone */ private static SimpleTimeZone addTimeZone(String id, double off) { int offset = (new Double(off * 3600000)).intValue(); SimpleTimeZone tz = new SimpleTimeZone(offset, id); s_timeZoneTable.put(id, tz); return tz; } }