Java TimeZone Create toTimeZone(String zone)

Here you can find the source of toTimeZone(String zone)

Description

Lookup timezone by ID.

License

Apache License

Parameter

Parameter Description
zone zone ID

Return

timezone

Declaration

public static TimeZone toTimeZone(String zone) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.TimeZone;

public class Main {
    /**/*from   w w w. j a  v a 2  s . c o  m*/
     * Lookup timezone by ID.
     * 
     * @param zone zone ID
     * @return timezone
     */
    public static TimeZone toTimeZone(String zone) {
        if (zone == null) {
            return null;
        }

        return TimeZone.getTimeZone(zone);
    }
}

Related

  1. getTotalTimeZoneOffset(TimeZone zone)
  2. getUserTimeZoneDate(String userTimezone)
  3. testSimpleTimeZone()
  4. toTimeZone(int gmtOffset)
  5. toTimeZone(String value)