public void createWeatherView(JSONObject data, boolean createCache) { try { SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHH", Locale.US); df.setTimeZone(TimeZone.getTimeZone("GMT+0")); Date reportTime = df.parse(data.getString("init")); SimpleDateFormat df2 = new SimpleDateFormat("yyyy-MM-dd HH:mm 'UTC'Z", Locale.US); updatetimeTextView.setText(df2.format(reportTime)); if (createCache) { cacheManager.createWeatherCache(longitude, latitude, reportTime, data.toString()); } WeatherView wv = new WeatherView(longitude, latitude, reportTime, userPrefs.isUseCen()); wv.setData(data); forecastScrollView.removeAllViews(); forecastScrollView.addView(wv.getView(context)); weatherUpdated = true; if (SettingsProvider.getInstance(context).isNewLaunch()) { Toast.makeText(getApplicationContext(), R.string.toast_cloud_info, Toast.LENGTH_LONG) .show(); } } catch (ParseException e) { e.printStackTrace(); } catch (JSONException e) { e.printStackTrace(); } }