Skip to content

[weather-sp] : better formatting of date & time in output template #535

Description

@mahrsee1997

Example:

For a file gs://test-input/test-file.grib the output file pattern is gs://test-output/splits/test-file_{date}-{time}.grib.
Then for date = 20200101, time = 1200, the output file for that split will be gs://test-output/splits/test-file_20200101-1200.grib.

But what if user want's output file as gs://test-output/splits/test-file_20200101-12:00:00.grib -- basically format date & time as per the need.

For such cases he can provide output file pattern as gs://test-output/splits/test-file_{date}-{datetime.strptime(f"{time}", "%H%M").strftime("%H:%M:%S")}.grib.

Make necessary changes for supporting this :) most probably just need to import datetime library and minor tweaking in logic.

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