unittest alarm_test.js Alarm Test Date handling getNextAlarmFireTime: Error: expected 1 to equal 5

RESOLVED FIXED

Status

Firefox OS
Gaia::Clock
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: sv99, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:33.0) Gecko/20100101 Firefox/33.0
Build ID: 20140902004002

Steps to reproduce:

Problem in my MAC OSX timezone Europe/Moscow UTC+4 

clock/test/unit/alarm_test.js
19:  suite('Date handling', function() {

    var now = new Date(1398387324081); // thursday

now -> Date 2014-04-25T00:55:24.081Z
now.getTimezoneOffset() -> -240

in my time zone this is not thursday -> this is friday!!
(Reporter)

Comment 1

4 years ago
Created attachment 8484949 [details] [diff] [review]
alarm_test.diff
Attachment #8484949 - Flags: review?(m)
Comment on attachment 8484949 [details] [diff] [review]
alarm_test.diff

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

aha, good catch!
Attachment #8484949 - Flags: review?(m) → review+
(Reporter)

Comment 3

4 years ago
Created attachment 8498756 [details] [review]
Link to PR (rebased)
Attachment #8498756 - Flags: review?(m)
Comment on attachment 8498756 [details] [review]
Link to PR (rebased)

Thanks! landed in master, r=mcav:

https://github.com/mozilla-b2g/gaia/commit/309ac9a90af199c8b8e67cbbbe16e1d4c7854970
Attachment #8498756 - Flags: review?(m) → review+
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.