Indonesia TimeZone Issue
807589Sep 30 2008 — edited Sep 30 2008All,
I am getting different time zone for Asia/Jakarta.
Code
=====
String tz = "Asia/Jakarta";
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm z");
dateFormat.setTimeZone(TimeZone.getTimeZone(tz));
String statusDate = dateFormat.format(new Date());
System.out.println(statusDate);
SimpleDateFormat dateFormat1 = new SimpleDateFormat("dd/MM/yyyy HH:mm Z");
dateFormat1.setTimeZone(TimeZone.getTimeZone(tz));
String statusDate1 = dateFormat1.format(new Date());
System.out.println(statusDate1);
Output
01/10/2008 01:17 WIT
01/10/2008 01:17 +0700
WIT should be UTC+9 not UTC+7 which is WIB.
Please check the below link
http://en.wikipedia.org/wiki/Time_in_Indonesia