Here you can find the source of findTimeZoneInDate(String date)
public static final TimeZone findTimeZoneInDate(String date)
//package com.java2s; import java.util.TimeZone; public class Main { public static final TimeZone findTimeZoneInDate(String date) { StringBuilder sb = new StringBuilder(); StringBuilder dateBuilder = new StringBuilder(date.trim()).reverse(); int index = 0; char c;// w w w . ja v a2s. c om while ((c = dateBuilder.charAt(index++)) != ' ') { sb.append(c); } TimeZone timezone = TimeZone.getTimeZone(sb.reverse().toString()); return timezone; } }