Page MenuHomePhabricator

Support date/time reformatting in Remarkup
Open, LowPublic

Description

We often use Maniphest for ticketing incidents which occur. We have teams in three different time zones which handle these incidents and it is often to difficult to communicate dates and times because of this. For example, the ticket might say "This issue started at 9:00AM YVR time". I usually then have to use some webservice to convert YVR time into my local timezone. It would be super useful if we could express these dates and times in Remarkup instead and have them automatically converted to the user's local timezone.

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Remarkup.
joshuaspence added a subscriber: joshuaspence.

My initial thought is that we should maybe just parse strings in various "almost certainly time" formats -- rather than adding a special syntax -- like:

9:00 AM UTC

...and render them with a local time hint:

9:00 AM UTC (1:00 AM PST)

...where the hint uses the viewer's timezone and is rendered in some slightly special way so it's clear that it's an artifact of remarkup rather than part of the original text. In v5 or whatever you could maybe click it to pop some little conversion UI.

Some drawbacks to this:

First, it won't work if you just write "9AM" without a timezone. Currently, no Remarkup rules are author-sensitive, and we'd really have to encode "the timezone the author had set when they made the comment" so old comments didn't change if an author moved or travelled. This is tractable, but we don't currently have any metadata store for comments. We could also literally rewrite the comment so "9AM" becomes "9AM EST" in the text, but I'm really hesitant to start doing this. If we do, I'd like to preserve the original text somewhere, which leaves us with the same metadata problem.

I'm actually not sure this is a problem we need to solve, though. At least as a v0, it seems pretty reasonable to just require an explicit timezone to activate time localization. That should reduce false positives, eliminate problems with users who have their timezones set wrong, etc. We could try to be more aggressive about 9AM eventually if the feature proves useful.

Second, this gets tricky with some cases like 7AM UTC -> 11PM PST, the previous day, daylight savings, etc. We do store the time when a comment was created, and can pass this to the markup engine to partially solve some of these problems. It's probably not hugely important that we get these cases 100% correct since time information tends to be less relevant over time, and it's probably not a huge problem if a comment in some unusual context which doesn't have date information skews by an hour in some timezones several months after it is made.

eadler added a project: Restricted Project.Aug 5 2016, 5:24 PM