如何找到开始日期和使用日期android的结束日期为夏时制时间在一年日期、夏时制、结束、时间

2023-09-04 23:43:16 作者:剧情再美,终究是戏

如何找到开始日期和结束日期为节省时间在安卓例如,使用日期一年日光如果2014年9月3日是日光节约时间的开始日期,是日光节约时间的结束日期2014年11月2日需要找到结束date.In我的应用程序是使用东时区GMT-5

How to find the begin date and end date for day light saving time using date in year in android eg If 09.03.2014 is day light saving time begin date and is day light saving time end date 02.11.2014 need to find end date.In my application am using East Time Zone GMT-5

感谢

推荐答案

对于给定的时区你可以用检索inDaylightTime(日)

要获得时区您需要:

TimeZone timezone = TimeZone.getTimeZone("GMT-05:00");

这里更多: http://developer.android.com/reference/java/util/TimeZone.html

More here: http://developer.android.com/reference/java/util/TimeZone.html