• Post Reply Bookmark Topic Watch Topic
  • New Topic

Indonesia TimeZone Issue

 
Naveen Kamrudeen
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
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 WIT.

Please check the below link
http://en.wikipedia.org/wiki/Time_in_Indonesia


Thanks

Naveen
 
Naveen Kamrudeen
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry the above statement should read

WIT should be UTC+9 not UTC+7 which is WIB.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!