public static long getCurrentEpochTimeStamp(String timeStamp) throws Exception { SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\'T\'HH:mm:ss\'.0Z\'\");
Set time zone to your SimpleDateFormat object.
SimpleDateFormat
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));