Bug 834988 - Clarify that all the DST-offset methods take a time in UTC seconds, and that the internal fields store UTC values. Also add documentation comments by the related methods. r=dmandelin

This commit is contained in:
Jeff Walden
2013-01-25 16:50:24 -08:00
parent 0cb49c4bed
commit 5e96ace96f
3 changed files with 47 additions and 39 deletions

View File

@@ -397,8 +397,8 @@ DaylightSavingTA(double t, DateTimeInfo *dtInfo)
t = MakeDate(day, TimeWithinDay(t));
}
int64_t timeMilliseconds = static_cast<int64_t>(t);
int64_t offsetMilliseconds = dtInfo->getDSTOffsetMilliseconds(timeMilliseconds);
int64_t utcMilliseconds = static_cast<int64_t>(t);
int64_t offsetMilliseconds = dtInfo->getDSTOffsetMilliseconds(utcMilliseconds);
return static_cast<double>(offsetMilliseconds);
}