Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestap format should be human-readable #5925

Open
JosuaCarl opened this issue Mar 26, 2025 · 1 comment
Open

Timestap format should be human-readable #5925

JosuaCarl opened this issue Mar 26, 2025 · 1 comment

Comments

@JosuaCarl
Copy link

JosuaCarl commented Mar 26, 2025

New feature

The current timestamp format is: "yyyyMMdd-A", producing something like 20250326-57453015. Especially the last part (A = milliseconds of a day) is very bad to read, although the first part is also pretty uneasy on the eye.

Use case

  • Looking at Trace files and searching the last run
  • Using the Trace timestamp for writing other timestamped output (for example in plugins) in a human-readable format.

Suggested implementation

I like the nf-core standard timestamp yyyy-MM-dd_HH-mm-ss. If more specificity is desired (milli- or even nanoseconds), one could change this to yyyy-MM-dd_HH-mm-ss-n.

Position of code:

@Memoized
static private String fmt(Instant instance) {
final formatter = DateTimeFormatter.ofPattern("yyyyMMdd-A").withZone(ZoneId.systemDefault())
return formatter.format(instance)
}

@bentsherman
Copy link
Member

@pditommaso I think you were the one who proposed this format, perhaps you can explain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants