[weather-sp] : better formatting of date & time in output template
- Dominant language
- Python
- Stars
- 252
- Forks
- 60
- Avg merge
- 8d 4h
- Merged PRs (30d)
- 3
Description
## 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.
Contributor guide
Assessment
This issue has not been assessed yet.