Page MenuHomePhabricator

Use UTC and ISO 8601 everywhere on frontend
Closed, ResolvedPublic

Description

Per discussion with @Mooeypoo. UTC will make handling cross-wiki easier, and ISO 8601 is the standard for API output.

It will only be converted to local time at the last moment (pun intended) when it affects rendering. However, this includes converting it before separating by day for the special page.

Event Timeline

We may use UTC in the model, since moment's default ISO 8601 formatting does not match the server, so we would have to format it ourselves at least temporarily:

moment.utc( 1469218871 * 1000 ).toISOString()
"2016-07-22T20:21:11.000Z"
moment.utc( 1469218871 * 1000 ).format()
"2016-07-22T20:21:11+00:00"
"2016-07-22T20:21:11Z" // From server
"2016-07-22T20:21:11Z"

Did https://gerrit.wikimedia.org/r/300596 take care of all of this, or is there still something left to do?

Mattflaschen-WMF renamed this task from Use UTC and ISO 8601 everywhere to Use UTC and ISO 8601 everywhere on frontend.Jul 27 2016, 6:44 PM

Did https://gerrit.wikimedia.org/r/300596 take care of all of this, or is there still something left to do?

I noticed that 'ts' was missed. I'll change this (it is a breaking change but I doubt anyone is using it). Grepping is not really feasible due to false positives.

Change 301489 had a related patch set uploaded (by Mattflaschen):
BREAKING CHANGE: Use ISO 8601 for 'ts' in cross-wiki summary.

https://gerrit.wikimedia.org/r/301489

Change 301489 merged by jenkins-bot:
BREAKING CHANGE: Use ISO 8601 for 'ts' in cross-wiki summary.

https://gerrit.wikimedia.org/r/301489

Betalabs 1.28.0-alpha (cea2da4) displays

echomarkseen:{result: "success", timestamp: "2016-07-29T22:17:46Z"}
result:"success"
timestamp:"2016-07-29T22:17:46Z"

Previously it was a warning, e.g.

warnings:
echomarkseen:{,…}
*:"The MW timestamp output format is deprecated here. In the future, ISO 8601 will always be used for the output timestamp format.  Adjust your client and set timestampFormat to 'ISO_8601'."