mitre / magma

MITRE Caldera's user interface plugin powered by VueJS
Apache License 2.0
2 stars 6 forks source link

Rerun date string format #55

Closed timbrigham-oc closed 1 week ago

timbrigham-oc commented 1 month ago

The rerun date strings are using a US centric format, month / day / year, hour:minue:second AM/PM by utilizing the toLocaleString.

I propose the use of ISO 8601 strings, much easier to read, and results in the operations to be sorted in a much more logical fashion.

In the attached screenshot you can see that everything executed on 6/6 was in the afternoon, and sorts by date as anticipated.

For 6/7, the bottom couple entries aren't in chronological order. Addition of padding and removing AM/PM as done by ISO8601 should rectify this.

image

timbrigham-oc commented 1 month ago

Screenshot showing the updated format -

image

elegantmoose commented 2 weeks ago

Fine with me.

@clenk , thoughts?

clenk commented 2 weeks ago

I like the change and am good with merging it as-is, but what would you think of replacing the T in the middle with a space to be more human-readable?

jbaptperez commented 2 weeks ago

@clenk, the T is required by ISO-8601 standard; it clearly indicates the time part of a date time string (as all date time components are optional in the standard). Being ISO-8601 means any ISO-8601 compatible library can read this date time.

However, this is probably not the target here and using a space instead of a T could be more human readable.