Here you can find the source of getLocalTime(Calendar calendar)
Parameter | Description |
---|---|
calendar | a parameter |
public static long getLocalTime(Calendar calendar)
//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()); } }