Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 640302 - Date comparisons in various add-on manager tests are fragile, and dependent on locale
: Date comparisons in various add-on manager tests are fragile, and dependent o...
Product: Toolkit
Classification: Components
Component: Add-ons Manager (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla6
Assigned To: Nobody; OK to take it and work on it
: Dave Townsend [:mossop]
Depends on:
Blocks: 514067 644044
  Show dependency treegraph
Reported: 2011-03-09 13:00 PST by Graeme McCutcheon [:graememcc]
Modified: 2011-05-01 14:40 PDT (History)
2 users (show)
hskupin: in‑testsuite+
hskupin: in‑litmus-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (1.90 KB, patch)
2011-03-09 13:00 PST, Graeme McCutcheon [:graememcc]
no flags Details | Diff | Splinter Review
v2 - catch other cases (4.63 KB, patch)
2011-03-10 03:18 PST, Graeme McCutcheon [:graememcc]
dtownsend: review+
Details | Diff | Splinter Review

Description Graeme McCutcheon [:graememcc] 2011-03-09 13:00:04 PST
Created attachment 518155 [details] [diff] [review]
Patch v1

A minor annoyance, so feel free to WONTFIX, but it makes me mutter when I run into it...

The date comparison tests fail locally for me in en_GB.

Date.parse is implementation-defined for strings not conforming to the ECMAScript date string format. Our implementation attempts to parse such strings as month/day/year or year/month/day, and for a two-digit year as an offset from 1900. Hence in this test in en_GB, the original date of 1 August 2010 gets compared against 8th January 1910, and fails.

It seems to me we want to test that detail-dateUpdated has been set to a date correctly formatted for a particular locale rather than testing it is equivalent to a specific date/time.
Comment 1 Graeme McCutcheon [:graememcc] 2011-03-10 03:18:27 PST
Created attachment 518321 [details] [diff] [review]
v2 - catch other cases

...actually, I'm hitting this in a couple of other tests too. Morphing to reflect this
Comment 2 Dave Townsend [:mossop] 2011-03-10 12:04:17 PST
Comment on attachment 518321 [details] [diff] [review]
v2 - catch other cases

Looks good, thanks
Comment 3 Graeme McCutcheon [:graememcc] 2011-04-17 13:36:18 PDT
Comment 4 Henrik Skupin (:whimboo) 2011-05-01 14:40:11 PDT
Verified fixed by check-in and passing tests.

Note You need to log in before you can comment on or make changes to this bug.