Closed Bug 834988 Opened 11 years ago Closed 11 years ago

Various date/time code naming/documentation improvements

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(2 files)

There's a lot wrong with the current code in terms of naming and lack of documentation.  (I also have my doubts that some parts of it are actually correct, as currently constructed, but it's hard to be sure one way or the other without doing some cleanups first.)
If the |(localTimeSeconds +/- ....)| bit looks wrong, that's because of more totally wrong naming, to be fixed in the next patch.
Attachment #706699 - Flags: review?(dmandelin)
There's more that should be done in this stuff, specifically around AdjustTime, but I haven't yet figured it out well enough to write a patch improving it.
Attachment #706700 - Flags: review?(dmandelin)
Attachment #706699 - Flags: review?(dmandelin) → review+
Comment on attachment 706700 [details] [diff] [review]
Various DST offset fixes

Review of attachment 706700 [details] [diff] [review]:
-----------------------------------------------------------------

The old parameter naming was really messed up. I would prefer something like 't' to utcSeconds, since it's really just a Unix/C time value.
Attachment #706700 - Flags: review?(dmandelin) → review+
It took me awhile to realize that in C, |t| is always a UTC time.  It's not in ES5, unfortunately, so I think the more-verbose, more-explicit naming is worthwhile for readers (like me, before I started these patches/reviews, and possibly after as well) more familiar with ECMAScript than with C date/time functionality.
https://hg.mozilla.org/integration/mozilla-inbound/rev/42042277940b
https://hg.mozilla.org/integration/mozilla-inbound/rev/aba0f5b6013c

I want to do a little bit more to the thoroughly byzantine AdjustTime, but at this point maybe I should just punt to another bug.
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: