}
});
}
TimezoneMap getTimeZoneMap(final String tzs) {
TimezoneMap map = new TimezoneMap();
if (tzs==null) return map;
JSONArray timezoneArray = JSONArray.fromObject(tzs);
for (int i=0; i<timezoneArray.size(); i++) {
JSONArray timezoneInfo = timezoneArray.getJSONArray(i);
long start = timezoneInfo.getLong(0)*1000;
// allow some padding for the last element in the map
long end = start + DateTimeConstants.MILLIS_PER_DAY;
if (timezoneArray.size()>=i+2)
end = timezoneArray.getJSONArray(i+1).getLong(0)*1000;
String ID = timezoneInfo.getString(1);
map.add(start, end, DateTimeZone.forID(ID));
}
//add some padding for the first element in the map
if (map.spans.size()>0) {
final TimespanSegment<DateTimeZone> first = map.spans.first();
first.setStart(first.getStart()-DateTimeConstants.MILLIS_PER_DAY);