Closed Bug 733674 Opened 13 years ago Closed 13 years ago

B2G SMS: Fix off-by-one errors in timestamp computation

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: philikon, Assigned: philikon)

References

Details

Attachments

(1 file)

Don't know what I was smoking at the time, but that code definitely ain't right, as jstraus points out: let year = this.readSwappedNibbleBCD(1) + PDU_TIMESTAMP_YEAR_OFFSET; let month = this.readSwappedNibbleBCD(1) - 1; let day = this.readSwappedNibbleBCD(1) - 1; let hour = this.readSwappedNibbleBCD(1) - 1; let minute = this.readSwappedNibbleBCD(1) - 1; let second = this.readSwappedNibbleBCD(1) - 1; year and month are correct, the rest isn't.
Blocks: b2g-sms
Attached patch v1 (deleted) — Splinter Review
Attachment #603606 - Flags: review?(kyle)
Attachment #603606 - Flags: review?(kyle) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: