From: Ash Date: Sun, 17 Dec 2017 00:38:49 +0000 (+0000) Subject: [bugfix] Fix #4251: Avoid RFC2822 in utc() test (#4312) X-Git-Tag: 2.20.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d78403840c1c34f13e874f337be6e947c7836c84;p=thirdparty%2Fmoment.git [bugfix] Fix #4251: Avoid RFC2822 in utc() test (#4312) --- diff --git a/src/test/moment/create.js b/src/test/moment/create.js index 91fb3a9f3..159dcf90b 100644 --- a/src/test/moment/create.js +++ b/src/test/moment/create.js @@ -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'); });