Here you can find the source of calendarToGPSTime(Calendar calendar)
Parameter | Description |
---|---|
date | a parameter |
public static long calendarToGPSTime(Calendar calendar)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static final long GPS_UNIX_EPOCH_OFFSET = 328665600; /**//from ww w . j a va2s .c o m * Takes a date string of the form dd-mm-yyyy hh:mm:ss and converts it into a GPS time * representing the number of seconds since 01-06-1980 00:00:00. * * @param date * @return */ public static long calendarToGPSTime(Calendar calendar) { // Return the time since 01/06/1980 00:00:00 return calendar.getTimeInMillis() / 1000L - GPS_UNIX_EPOCH_OFFSET; } }