Here you can find the source of utcToLocal(Date utcDate)
protected static Date utcToLocal(Date utcDate)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { protected static Date utcToLocal(Date utcDate) { long utcMiliseconds = utcDate.getTime(); Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(utcMiliseconds); return new Date(utcMiliseconds + cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)); }/*from ww w .j a va 2 s . com*/ }