Java Calendar Time unixToCalendar(long unixTime)

Here you can find the source of unixToCalendar(long unixTime)

Description

Converts Unix time to Calendar instance.

License

LGPL

Return

calendar object

Declaration

public static Calendar unixToCalendar(long unixTime) 

Method Source Code

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

import java.util.Calendar;

public class Main {
    /**//ww  w  .j a  v a  2  s  . c  o m
     * Converts Unix time to Calendar instance.
     * @return calendar object
     */
    public static Calendar unixToCalendar(long unixTime) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(unixTime);
        return calendar;
    }
}

Related

  1. toDefaultTimeZone(Calendar calendar)
  2. toTimeStamp(Calendar cal)
  3. toTimeString(final Calendar calendar)
  4. toUnixTime(Calendar timestamp)
  5. toVonTime(final Calendar cal)
  6. zeroTime(Calendar cal)
  7. zeroTimeFields(Calendar cal)