fix(pkg/logfile): set creation date only if nil
This commit is contained in:
		@@ -176,6 +176,8 @@ func WriteTemperaturesCustom(temperatures []*types.Temperature, w io.Writer, com
 | 
				
			|||||||
func writeCreationDate(temperatures []*types.Temperature) {
 | 
					func writeCreationDate(temperatures []*types.Temperature) {
 | 
				
			||||||
	now := time.Now()
 | 
						now := time.Now()
 | 
				
			||||||
	for _, temperature := range temperatures {
 | 
						for _, temperature := range temperatures {
 | 
				
			||||||
		temperature.CreationDate = &now
 | 
							if temperature.CreationDate == nil {
 | 
				
			||||||
 | 
								temperature.CreationDate = &now
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user