Java Date UTC Parse uTCToChinaTS(Date date)

Here you can find the source of uTCToChinaTS(Date date)

Description

u TC To China TS

License

Open Source License

Declaration

public static Date uTCToChinaTS(Date date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;
import java.util.Date;

public class Main {

    public static Date uTCToChinaTS(Date date) {
        Calendar ca = Calendar.getInstance();
        ca.setTime(date);/*from w  w  w  . ja  v a 2 s. c  o m*/
        ca.add(Calendar.HOUR, 8);
        return ca.getTime();

        //long localTime = date.getTime() + 1000 * 60 * 60 * 8;
        //Date localDateTime = new Date(localTime);
        //return localDateTime;
    }
}

Related

  1. parseUTCDateToString(Date date)
  2. parseUTCToDate(String utcDate)
  3. toUTC(Date date)
  4. toUTC(Date date)
  5. toUTC(Date date)
  6. UTCToDate(long utcValue)
  7. utcToLocal(Date utcDate)