mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 04:10:06 +00:00 
			
		
		
		
	A query for the epoch should be treated as time now
This commit is contained in:
		
							parent
							
								
									f4226b487d
								
							
						
					
					
						commit
						449d8cb796
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		|  | @ -1233,14 +1233,14 @@ bool RadarProductManagerImpl::AreProductTimesPopulated( | |||
|    const std::shared_ptr<ProviderManager>& providerManager, | ||||
|    std::chrono::system_clock::time_point   time) | ||||
| { | ||||
|    const auto today = std::chrono::floor<std::chrono::days>(time); | ||||
|    auto today = std::chrono::floor<std::chrono::days>(time); | ||||
| 
 | ||||
|    bool productTimesPopulated = true; | ||||
| 
 | ||||
|    // Don't query for the epoch, assume populated
 | ||||
|    // Assume a query for the epoch is a query for now
 | ||||
|    if (today == std::chrono::system_clock::time_point {}) | ||||
|    { | ||||
|       return productTimesPopulated; | ||||
|       today = std::chrono::floor<std::chrono::days>(scwx::util::time::now()); | ||||
|    } | ||||
| 
 | ||||
|    const auto yesterday = today - std::chrono::days {1}; | ||||
|  | @ -1307,12 +1307,12 @@ void RadarProductManagerImpl::PopulateProductTimes( | |||
|                   providerManager->product_, | ||||
|                   scwx::util::time::TimeString(time)); | ||||
| 
 | ||||
|    const auto today = std::chrono::floor<std::chrono::days>(time); | ||||
|    auto today = std::chrono::floor<std::chrono::days>(time); | ||||
| 
 | ||||
|    // Don't query for the epoch
 | ||||
|    // Assume a query for the epoch is a query for now
 | ||||
|    if (today == std::chrono::system_clock::time_point {}) | ||||
|    { | ||||
|       return; | ||||
|       today = std::chrono::floor<std::chrono::days>(scwx::util::time::now()); | ||||
|    } | ||||
| 
 | ||||
|    const auto yesterday = today - std::chrono::days {1}; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat