public static long toUnixTime(Calendar timestamp){
  return timestamp.getTimeInMillis() / 1000L;
}

public static long toUnixTime ( Calendar timestamp ) { return timestamp . getTimeInMillis ( ) / 1000L ; }
convert from a java calendar instance into a unix time stamp . java calendar instances contain timezone information . this will be lost in the conversion and no attempt will be made to reconcile the local timezone with the timezone information in the calendar .
