如何找到开始日期和结束日期为节省时间在安卓例如,使用日期一年日光如果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