如何找到开始日期和使用日期android的结束日期为夏时制时间在一年 [英] How to find the begin date and enddate for daylight saving timing using date in year in android

查看:248
本文介绍了如何找到开始日期和使用日期android的结束日期为夏时制时间在一年的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

这篇关于如何找到开始日期和使用日期android的结束日期为夏时制时间在一年的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆