Here you can find the source of getCalendarWithoutTimeZone(Date date)
Parameter | Description |
---|---|
date | The Date to convert to Calendar |
public static Calendar getCalendarWithoutTimeZone(Date date)
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { /**/*from w w w .ja v a2s .c o m*/ * Returns a Calendar with no time zone * @param date The Date to convert to Calendar * @return the Calendar */ public static Calendar getCalendarWithoutTimeZone(Date date) { if (date == null) { return null; } Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.clear(Calendar.ZONE_OFFSET); return cal; } }