Here you can find the source of resolveTimeZone(SimpleDateFormat sdf, String timezone)
public static void resolveTimeZone(SimpleDateFormat sdf, String timezone)
//package com.java2s; //License from project: Apache License import java.util.TimeZone; import java.text.SimpleDateFormat; public class Main { /**/*from w w w . jav a 2 s.com*/ * Wrap TimeZone.getTimeZone so that reflection doesn't need to look for * sun.util.calendar.ZoneInfo which causes warnings in some environments */ public static void resolveTimeZone(SimpleDateFormat sdf, String timezone) { sdf.setTimeZone(TimeZone.getTimeZone(timezone)); } }