Page MenuHomePhabricator

Flow does not respect time format and time zone preferences in JS mode
Open, MediumPublic

Description

If you set your time format preference to something exotic like 2015-06-17T00:05:45 , this isn't respected by Flow in JS mode, but it is respected in non-JS mode.

This implies we rerender timestamps in JS mode. Why?!

See also T61919: Flow: Timestamps should respect user's timezone preference

Event Timeline

Catrope raised the priority of this task from to Needs Triage.
Catrope updated the task description. (Show Details)
Catrope added a project: StructuredDiscussions.
Catrope subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

IIRC, JS rerenders timestamps so they can go from "4 minutes ago" to "15 minutes ago" when you come back after 10 minutes without refreshing the page.

But we should indeed implement other time formats in JS.

Catrope renamed this task from Flow does not respect time format preference in JS mode to Flow does not respect time format and time zone preferences in JS mode.Jul 1 2015, 11:48 PM
Catrope set Security to None.

IIRC, JS rerenders timestamps so they can go from "4 minutes ago" to "15 minutes ago" when you come back after 10 minutes without refreshing the page.

No, that happens server-side: it works in non-JS mode. It appears timestamps are just getting rerendered by JS for no good reason.

Catrope triaged this task as Medium priority.Jul 1 2015, 11:50 PM
Catrope moved this task from Untriaged to Near-Term Interest on the Collaboration-Team-Triage board.

What I was talking about was timestampAutoUpdate() in flow-handlebars.js, which turns 'a few seconds ago' into 'a minute ago' even if you didn't refresh (can't come from the server)
The server also renders that (though with minor differences: JS 'a minute ago' = PHP '1 minute ago', but that wouldn't update without a refresh.

However, that's probably not what this ticket was about. What the ticket is about is the timestamp, not the times-ago thing. I also don't see a reason to re-render that client-side, since that timestamp doesn't change & doesn't need to be updated.