1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed toGMTString() possibly should be replaced with toUTCString()

Discussion in 'Resolved Bug Reports' started by rellect, Dec 24, 2014.

  1. rellect

    rellect Well-Known Member

    Nothing serious here, but thought to note about it.
    toGMTString() is used in the setCookie() function in xenforo.js.
    toGMTString() is deprecated, and toUTCString() should be used instead.
  2. rainmotorsports

    rainmotorsports Well-Known Member

    Would be a suggestion rather than a vug report I think. Out of curiosity is there a php version the move was made in. Would save research for them.
  3. thedude

    thedude Well-Known Member

    toUTCString was introduced in JavaScript 1.3 and is supported by all major browsers, including ie7
  4. rainmotorsports

    rainmotorsports Well-Known Member

    Oops missed it was a JavaScript function. Still a different avenue of consideration. Just needs to fall in line with current browsers supported. Which it should.
  5. Chris D

    Chris D XenForo Developer Staff Member

    I did a bit of testing with this and it seems like a worthwhile change.

    Interestingly, XenForo itself doesn't use setCookie with an expiry date anywhere; only session cookies are set with that method in the core.
    Marcus likes this.

Share This Page