如何从安卓手机获取时区?
我想在点击按钮时从 Android 手机获取时区.
I want to get the time zone from the Android mobile when clicking a button.
推荐答案
你试过用TimeZone.getDefault()
:
大多数应用程序将使用返回基于 TimeZone 的 TimeZone.getDefault()在程序运行的时区.
Most applications will use TimeZone.getDefault() which returns a TimeZone based on the time zone where the program is running.
参考:http://developer.android.com/reference/java/util/TimeZone.html
相关文章