问题描述
我找不到类似的问题,所以就解决了。
I couldn't find a similar question around, so here it goes.
我需要创建一些警报,并基本上确定夏令时的临近,即 下个星期四的白天开始
I need to create some alerts and basically identify when a daylight saving time approaches, i.e. next thursday daylight begins
问题时区如何知道正确的信息?
Question How does Timezone knows the correct info?
我之所以这样问,是因为,例如,在我们的国家(巴西),将日期定义为政府将要发生的日期的前一年。它甚至可能在特定年份不存在。
I ask that because, for instance, in my country - Brazil - the day is defined one year before when it will happen by government. It could potentially not even exist on a specific year. This probably happens in other countries as well.
在,可以找到以下信息:
On Java Doc, the below info can be found:
表示返回了历史上正确的。但是这种检测时区的方法是否值得信赖?它是否依赖于常规的Java更新,例如是否可以从Windows中的某个位置读取?
It says it returns a historically correct. But how trustworthy is this method for detecting timezones? Does it depends on regular java updates, does it read from somewhere in Windows, for instance ?
预先感谢!
推荐答案
时区更新工具
以下链接说明了使用 Timezone Updater Tool 。
基本上,下载工具jar并运行命令
Basically, download the tool jar and run the command
java -jar tzupdater.jar选项
这篇关于java.util.TimeZone日光信息如何更新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!