Android examples for java.util:Timezone
Gets Date with UTC time zone
//package com.java2s; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; public class Main { /**//from w ww .j av a2 s .c o m * Gets Date with UTC time zone * @param date is concrete date * @return new instance calendar */ public static Calendar getCalendarUTC(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.setTimeZone(TimeZone.getTimeZone("UTC")); return calendar; } }