Android Timezone Change getLocalCalendar()

Here you can find the source of getLocalCalendar()

Description

get Local Calendar

Declaration

public static Calendar getLocalCalendar() 

Method Source Code

//package com.java2s;

import java.util.Calendar;

import java.util.TimeZone;

public class Main {
    public static final String TIMEZONE_CN = "Asia/Shanghai";

    public static Calendar getLocalCalendar() {
        Calendar localCalendar = Calendar.getInstance(TimeZone
                .getTimeZone(TIMEZONE_CN));
        return localCalendar;
    }/*from w w  w . ja va  2  s  .c o  m*/
}

Related

  1. serverTimeStringToLocalDateTime( String serverTimeString, String serverTimeFormat)
  2. localDateTimeToServerTimeString( Date localDateTime, String serverTimeFormat)