Java Calendar Time getLocalTime(Calendar calendar)

Here you can find the source of getLocalTime(Calendar calendar)

Description

Return the milliseconds passed since 1.1.1970 00:00:00.000 [TimeZone]

License

Open Source License

Parameter

Parameter Description
calendar a parameter

Declaration

public static long getLocalTime(Calendar calendar) 

Method Source Code

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

import java.util.Calendar;

public class Main {
    /**//from   w w  w. j a v  a2 s  .c  o m
     * Return the milliseconds passed since 1.1.1970 00:00:00.000 [TimeZone]
     * 
     * @param calendar
     * @return
     */
    public static long getLocalTime(Calendar calendar) {
        return calendar.getTimeInMillis() + calendar.getTimeZone().getOffset(calendar.getTimeInMillis());
    }
}

Related

  1. getCurrentTimeIfCalendareIsNull(Calendar testDate)
  2. getCurrentTimeLongType(Calendar cal)
  3. getCurrentTimeZoneCalendar(String timeZone)
  4. getDateTimeByDate(Date date, int calendarType, int qty)
  5. getFullTimeToString(Calendar argCal)
  6. getMaxTimeCalendar(Calendar source)
  7. getTime(Calendar c)
  8. getTime(Calendar c)
  9. getTime(Calendar cal)