Skip to content

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

@gdevenyi

Description

@gdevenyi

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

  • Nextflow version: version 23.10.0 build 5891
  • Java version: OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)
  • Operating system: Linux
  • Bash version: n 5.1.16(1)-release

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions