mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-31 00:12:18 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			207 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			207 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package utils
 | |
| 
 | |
| import "time"
 | |
| 
 | |
| func InitTime(ts ...*time.Time) {
 | |
| 	for i := range ts {
 | |
| 		if ts[i] == nil {
 | |
| 			continue
 | |
| 		}
 | |
| 		if ts[i].IsZero() || ts[i].UnixMicro() < 0 {
 | |
| 			*ts[i] = time.UnixMicro(0)
 | |
| 		}
 | |
| 	}
 | |
| }
 |