fix(pkg/logfile): set creation date only if nil
This commit is contained in:
parent
7a3b3c6218
commit
fbb062d091
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user