Skip to content

Add date-stamp to json output #615

@zerothi

Description

@zerothi

Is your feature request related to a problem? Please describe.

When I do module av -l I get something like this:

zstd/1.5.7                                                  2025/03/03 11:28:13

with proper date stamp.
However, if i do module av -j I get:

"zstd/1.5.7": { "name": "zstd/1.5.7", "type": "modulefile", "symbols": [], "tags": [], "pathname": "/apps/dcc/etc/ModulesAlma92/modulefiles/zstd/1.5.7"},

Additionally, it might be fun to add variant information to the json output? (digression, should I open a new issue?)

Describe the solution you'd like

It would be great if the json output could also add the date-stamp.

The reason is I plan on using it to hide modules older than some set time, and this just seemed like the simplest extraction method.

Describe alternatives you've considered

Use module av -l however, the problem with this is that some of our module files are extremely long, resulting in:

petsc/3.24.0-oct-2025-gcc-14.3.0-openblas-0.3.30-non-complex-slepc-elemental-superlu2025/10/07 00:42:39

which requires manual parsing.

(side-note:
I also tried to figure out if I could manually format the output in long-mode, however, I couldn't figure out from the documentation how to set the field-widths, is it even possible?
)

Additional context

The installed version is:
Modules Release 5.3.0 (2023-05-14)

AFAIK without any odd configuration setups.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions