PKGBUILD/pkg/logfile/utils.go

20 lines
364 B
Go

package logfile
import (
"time"
"github.com/go-flucky/flucky/pkg/types"
)
//.999999999 -0700 MST
var timeFormat = "2006-01-02 15:04:05.999999999 -0700"
func writeCreationDate(temperatures []*types.Temperature) {
now := time.Now()
for _, temperature := range temperatures {
if temperature.CreationDate == nil {
temperature.CreationDate = &now
}
}
}