mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 05:10:04 +00:00 
			
		
		
		
	Use HH date library when not using MSVC
This commit is contained in:
		
							parent
							
								
									e78dc9b3db
								
							
						
					
					
						commit
						593010acc2
					
				
					 10 changed files with 98 additions and 14 deletions
				
			
		|  | @ -2,16 +2,26 @@ | |||
| 
 | ||||
| #include <chrono> | ||||
| 
 | ||||
| #if !defined(_MSC_VER) | ||||
| #   include <date/tz.h> | ||||
| #endif | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace util | ||||
| { | ||||
| 
 | ||||
| #if defined(_MSC_VER) | ||||
| typedef std::chrono::time_zone time_zone; | ||||
| #else | ||||
| typedef date::time_zone time_zone; | ||||
| #endif | ||||
| 
 | ||||
| std::chrono::system_clock::time_point TimePoint(uint32_t modifiedJulianDate, | ||||
|                                                 uint32_t milliseconds); | ||||
| 
 | ||||
| std::string TimeString(std::chrono::system_clock::time_point time, | ||||
|                        const std::chrono::time_zone*         timeZone = nullptr, | ||||
|                        const time_zone*                      timeZone = nullptr, | ||||
|                        bool                                  epochValid = true); | ||||
| 
 | ||||
| } // namespace util
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat