]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[bugfix] Fix #4251: Avoid RFC2822 in utc() test (#4312)
authorAsh <ash@hexmen.com>
Sun, 17 Dec 2017 00:38:49 +0000 (00:38 +0000)
committerKunal Marwaha <marwahaha@berkeley.edu>
Sun, 17 Dec 2017 00:38:49 +0000 (19:38 -0500)
src/test/moment/create.js

index 91fb3a9f3ac1d3f18795d6d61c00d21fc89ceebb..159dcf90b1f8dc20561d33ae0bc418215d91be7a 100644 (file)
@@ -354,8 +354,8 @@ test('string with format (timezone offset)', function (assert) {
     c = moment('2011 2 1 10 -05:00', 'YYYY MM DD HH Z');
     d = moment('2011 2 1 8 -07:00', 'YYYY MM DD HH Z');
     assert.equal(c.hours(), d.hours(), '10 am central time == 8 am pacific time');
-    e = moment.utc('Fri, 20 Jul 2012 17:15:00', 'ddd, DD MMM YYYY HH:mm:ss');
-    f = moment.utc('Fri, 20 Jul 2012 10:15:00 -0700', 'ddd, DD MMM YYYY HH:mm:ss ZZ');
+    e = moment.utc('20 07 2012 17:15:00', 'DD MM YYYY HH:mm:ss');
+    f = moment.utc('20 07 2012 10:15:00 -0700', 'DD MM YYYY HH:mm:ss ZZ');
     assert.equal(e.hours(), f.hours(), 'parse timezone offset in utc');
 });