Android Timezone Get getTimeZone()

Here you can find the source of getTimeZone()

Description

get Time Zone

Declaration

private static TimeZone getTimeZone() 

Method Source Code

//package com.java2s;

import java.util.TimeZone;

public class Main {
    public static final int TIME_ZONE_OFFSET = 3;

    private static TimeZone getTimeZone() {
        if (TIME_ZONE_OFFSET > 0) {
            return TimeZone.getTimeZone("GMT+" + TIME_ZONE_OFFSET);
        }/*from  www  .ja va 2  s  .  c o  m*/
        if (TIME_ZONE_OFFSET < 0) {
            return TimeZone
                    .getTimeZone("GMT-" + Math.abs(TIME_ZONE_OFFSET));
        }
        return TimeZone.getTimeZone("GMT+0");
    }
}

Related

  1. getGmtTimeZone()
  2. setDefaultTimeZoneToVietnam()
  3. getLocalDateTimeFromString(String gmtString, String orgFormat, String format)