如何从Android手机时区?时区、手机、Android

2023-09-12 03:10:16 作者:一棵树

我想从Android手机点击一个按钮时得到的时区。

I want to get the time zone from the Android mobile when clicking a button.

推荐答案

你有没有试过用 TimeZone.getDefault()

TimeZone.getDefault()它返回一个TimeZone基于大多数应用程序将使用   上的时区,在那里该程序正在运行。

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