-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NWS image timestamp extraction (#137)
The pattern that encodes the timestamp for NWS images used to be irregular and required careful parsing. This pattern was changed some time before November 2020 and became regular. The irregular parser produced invalid timestamps when applied to filenames with the new pattern. This commit updates the function that extracts a timestamp from the filename to expect the regular pattern. This commit also removes the timestamp prefix from the filename if it could be extracted, allowing users to specify their own timestamp pattern. This means that a handler with the following definition: ``` filename = "{time:%Y%m%dT%H%M%SZ}_{filename}" ``` No longer produces filenames: ``` 20220327T110046Z_20220327110046-hiwind_pac_latest.gif ``` But rather: ``` 20220327T110046Z_hiwind_pac_latest.gif ``` Fixes #100.
- Loading branch information
Showing
2 changed files
with
23 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters