mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 14:30:04 +00:00
Don't crash if a bad date is provided to data provider formatter
This commit is contained in:
parent
afe63df72a
commit
b162fda895
2 changed files with 10 additions and 0 deletions
|
|
@ -52,6 +52,11 @@ AwsLevel2DataProvider::operator=(AwsLevel2DataProvider&&) noexcept = default;
|
|||
std::string
|
||||
AwsLevel2DataProvider::GetPrefix(std::chrono::system_clock::time_point date)
|
||||
{
|
||||
if (date < std::chrono::system_clock::time_point {})
|
||||
{
|
||||
date = std::chrono::system_clock::time_point {};
|
||||
}
|
||||
|
||||
return fmt::format("{0:%Y/%m/%d}/{1}/", fmt::gmtime(date), p->radarSite_);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue