Closed Bug 794127 Opened 12 years ago Closed 12 years ago

hal::AdjustSystemClock should take a 64-bit value

Categories

(Core :: Hardware Abstraction Layer (HAL), defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18
blocking-basecamp +

People

(Reporter: justin.lebar+bug, Assigned: airpingu)

References

Details

Attachments

(1 file)

Right now, hal::AdjustSystemClock takes a signed 32-bit delta, representing the number of ms we want to move the clock forward or backwards.

That means we can't adjust the system clock more than 2^31 / (24 * 60 * 60 * 1000) = 25 days!!

We need to change this to a 64-bit value.  I'd also be OK if we changed it to take an absolute date, instead of an interval.  That might be slightly less accurate, but I'm not sure it matters.
I think this bug will make us incapable of properly setting the system clock when we receive the time from a cell tower, if the system time is more than 25 days off from the cell tower.  Ouch.
blocking-basecamp: --- → ?
Gene, do you want to take this one?
blocking-basecamp: ? → +
Make sense to me! Should be able to come back with the patch very soon.
Assignee: nobody → clian
Blocks: 789973
Attached patch PatchSplinter Review
Changes are trivial. s/int32_t/int64_t. Please let me know if any details can be improved. Thanks!
Attachment #664780 - Flags: review?(jones.chris.g)
Attachment #664780 - Flags: review?(jones.chris.g) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6b444917f491
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: