mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 04:10:06 +00:00 
			
		
		
		
	Update most instances of current time to use a time offset
This commit is contained in:
		
							parent
							
								
									e0a4dee72b
								
							
						
					
					
						commit
						bd27d0e562
					
				
					 19 changed files with 48 additions and 38 deletions
				
			
		|  | @ -302,7 +302,7 @@ AwsLevel2ChunksDataProvider::Impl::GetScanTime(const std::string& prefix) | |||
|    if (scanTimeIt != scanTimes_.cend()) | ||||
|    { | ||||
|       // If the time is greater than 2 hours ago, it may be a new scan
 | ||||
|       auto replaceBy = system_clock::now() - hours {2}; | ||||
|       auto replaceBy = util::time::now() - hours {2}; | ||||
|       if (scanTimeIt->second > replaceBy) | ||||
|       { | ||||
|          return scanTimeIt->second; | ||||
|  | @ -333,8 +333,7 @@ AwsLevel2ChunksDataProvider::Impl::ListObjects() | |||
|    size_t       newObjects   = 0; | ||||
|    const size_t totalObjects = 0; | ||||
| 
 | ||||
|    const std::chrono::system_clock::time_point now = | ||||
|       std::chrono::system_clock::now(); | ||||
|    const std::chrono::system_clock::time_point now = util::time::now(); | ||||
| 
 | ||||
|    if (currentScan_.valid_ && !currentScan_.hasAllFiles_ && | ||||
|        lastTimeListed_ + std::chrono::minutes(2) > now) | ||||
|  |  | |||
|  | @ -352,7 +352,7 @@ std::pair<size_t, size_t> AwsNexradDataProvider::Refresh() | |||
| 
 | ||||
|    logger_->debug("Refresh()"); | ||||
| 
 | ||||
|    auto today     = floor<days>(system_clock::now()); | ||||
|    auto today     = floor<days>(util::time::now()); | ||||
|    auto yesterday = today - days {1}; | ||||
| 
 | ||||
|    std::unique_lock lock(p->refreshMutex_); | ||||
|  | @ -388,7 +388,7 @@ void AwsNexradDataProvider::Impl::PruneObjects() | |||
| { | ||||
|    using namespace std::chrono; | ||||
| 
 | ||||
|    auto today     = floor<days>(system_clock::now()); | ||||
|    auto today     = floor<days>(util::time::now()); | ||||
|    auto yesterday = today - days {1}; | ||||
| 
 | ||||
|    std::unique_lock lock(objectsMutex_); | ||||
|  |  | |||
|  | @ -108,7 +108,7 @@ WarningsProvider::LoadUpdatedFiles( | |||
|    std::vector<std::shared_ptr<awips::TextProductFile>> updatedFiles; | ||||
| 
 | ||||
|    const std::chrono::sys_time<std::chrono::hours> now = | ||||
|       std::chrono::floor<std::chrono::hours>(std::chrono::system_clock::now()); | ||||
|       std::chrono::floor<std::chrono::hours>(util::time::now()); | ||||
|    std::chrono::sys_time<std::chrono::hours> currentHour = | ||||
|       (startTime != std::chrono::sys_time<std::chrono::hours> {}) ? | ||||
|          startTime : | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat