Java Date UTC Parse UTCToDate(long utcValue)

Here you can find the source of UTCToDate(long utcValue)

Description

UTC To Date

License

Apache License

Declaration

public static Date UTCToDate(long utcValue) 

Method Source Code

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

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

public class Main {

    public static Date UTCToDate(long utcValue) {
        Date date = null;/*  w  ww . ja v a 2  s  .c o m*/
        Calendar calendar = Calendar.getInstance();
        calendar.set(1970, 0, 1, 8, 0, 0);
        long start = calendar.getTimeInMillis();
        long end = start + 1000 * utcValue;
        date = new Date(end);
        return date;
    }
}

Related

  1. parseUTCToDate(String utcDate)
  2. toUTC(Date date)
  3. toUTC(Date date)
  4. toUTC(Date date)
  5. uTCToChinaTS(Date date)
  6. utcToLocal(Date utcDate)