Can any one explain how Java SimpleTimeZone rules are interpreted. For example a rule for Europe/London is as follows:
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
};
Reading the STZ documentation is helpful but not for this particular rule.
What does endDay = 0 signify? What if startDay = 0?
thanks,
In the API (same link you provided in the question), the constructor documentation says:
Could you be more specific about what’s confusing?
EDIT:
Okay, I better understand your question now. As you have figured out for yourself, a positive number means “count forwards” and a negative number means “count backwards.”
Zero appears to indicate that there is no daylight savings active in that location.EDIT 2:
Per the source, “a value of 0 is illegal.” See lines 984 and 1045. This appears to be okay, if
useDaylightis false, though that is not the case in your sample JSON.