Sean Goudarzi
Sean Goudarzi

Reputation: 1544

Get timezone with continent and city in Android (e.g. Asia/Seoul)

I want to get the continent and city of the default Timezone in Android. I have tried using getDefault().getDisplayName() on the Timezone class but the string it returns isn't what I want (which is Asia/Seoul). Is there anyway to do this?

Upvotes: 2

Views: 597

Answers (1)

Sean Goudarzi
Sean Goudarzi

Reputation: 1544

I found it. Simply use getId() on the Timezone class.

Upvotes: 3

Related Questions