任何人都可以解釋如何解釋Java SimpleTimeZone規則。例如,對於歐洲/倫敦的規則如下:試圖瞭解Java SimpleTimeZone規則
var rule = {
"dstSavings": 3600000,
"startYear": 0,
"startMonth": 2,
"startDay": -1,
"startDayOfWeek": 1,
"endMonth": 9,
"endDay": -1,
"endDayOfWeek": 1,
"endTime": 3600000,
"rawOffset": 0,
"startTime": 3600000,
"startTimeMode": "UTC",
"endTimeMode": "UTC",
"useDaylight": true
};
讀STZ documentation是有用的,但不是這個特定的規則。
endDay = 0是什麼意思?如果startDay = 0會怎麼樣?
感謝,
該代碼是JavaScript,而不是Java? – BalusC 2010-03-09 20:45:47
true,它的js對象表示法,認爲描述SimpleTimeZone對象是很容易的。 – bushman 2010-03-09 20:48:43
它們在任何構造函數的javadoc中詳細解釋。例如,這個完整的c'tor:http://java.sun.com/javase/6/docs/api/java/util/SimpleTimeZone.html#SimpleTimeZone%28int,%20java.lang.String,%20int,%20int ,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int%29檢查「參數」部分。如果不清楚,請詳細說明究竟什麼是不明確的。 – BalusC 2010-03-09 20:54:06