nextflow-io / nextflow

A DSL for data-driven computational pipelines
http://nextflow.io
Apache License 2.0
2.71k stars 622 forks source link

Date and Time representations are inconsistent, leading to ambiguity #4754

Open gdevenyi opened 7 months ago

gdevenyi commented 7 months ago

Bug report

The current implementations of human-readable dates and times are ambiguous in terms of their timezone, and in the case of durations, difficult to properly parse.

Expected behavior and actual behavior

Current dates are ambiguous of timezone: 2024-02-16 02:22:56.668

Should be 2024-02-16T02:22:56.668-05:00 (in my case Eastern) or universal time 2024-02-16T07:22:56.668+00:00

https://en.wikipedia.org/wiki/ISO_8601

Similarly, durations, such as in the trace report: 5h 50m 9s

Should use the duration format of ISO https://en.wikipedia.org/wiki/ISO_8601#Durations

PT5H50M9S

Or the alternative, perhaps more familiar PT05:50:09

Steps to reproduce the problem

Observe existing date/time representations

N/A

Environment

Additional context

Implementation shouldn't be too hard as I think these are all human-readable outputs and not used internally, but existing libraries should have proper formatting options already available here.

ashsgelb commented 5 months ago

Hi, I would like to try and work on this task. Does this just consist of going through all of the files and finding anywhere where dates exist and changing them with a more clear format? And if so how would I know which files to look at specifically which do contain dates. I am sorry I am new and would like to contribute to this project. Thanks for the help!