You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Armand Grillet (JIRA)" <ji...@apache.org> on 2019/02/15 09:03:00 UTC

[jira] [Commented] (MESOS-9575) Mesos Web UI can't display relative timestamps in the future

    [ https://issues.apache.org/jira/browse/MESOS-9575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769093#comment-16769093 ] 

Armand Grillet commented on MESOS-9575:
---------------------------------------

relative-date has not been updated since 2011: https://github.com/azer/relative-date
We could use https://github.com/moment/moment/ which can [parse UNIX timestamps|https://momentjs.com/docs/#/parsing/unix-timestamp/] and return relative dates in the past and the future:
{noformat}
moment("20111031", "YYYYMMDD").fromNow(); // 7 years ago
moment().startOf('day').fromNow();        // 10 hours ago
moment().endOf('day').fromNow();          // in 14 hours
{noformat}

> Mesos Web UI can't display relative timestamps in the future
> ------------------------------------------------------------
>
>                 Key: MESOS-9575
>                 URL: https://issues.apache.org/jira/browse/MESOS-9575
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Benno Evers
>            Priority: Major
>
> The `relativeDate()` function used by the Mesos WebUI (https://gitbox.apache.org/repos/asf?p=mesos.git;a=blob_plain;f=src/webui/assets/libs/relative-date.js;hb=HEAD) is only able to handle dates in the past. All dates in the future are rendered as "just now".
> This can be especially confusing when posting maintenance windows, where usually both dates are in the future.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)