• Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue with getting time zones  RSS feed

 
Sayantan Majumdar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to get all available time zones in 3 letter format. like "GMT", "PST" etc.. I was trying to use TimeZone.getAvailableIDs(). But this function does not return the 3 letter format. Could you please suggest a way out. Thanks in advance.
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sayantan,


Once you get the Available Ids in a String array , pass it to the TimeZone.getTimeZone("YZX") and use getDisplayName() with style as (SHORT)
PS: Dont have JDK installed to try out the better way than this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!