Add UTC time-based generators

This commit is contained in:
Dan Jones 2025-03-10 11:52:55 -05:00
commit 1af608d7c9
2 changed files with 19 additions and 0 deletions

View file

@ -47,3 +47,13 @@ func WithFormattedTime(t time.Time, f string) Option {
})
}
}
const FileTimestampNoTZ string = "2006-01-02_03-05-06"
func WithTimestampUTC() Option {
return WithTimeUTC(time.Now())
}
func WithTimeUTC(t time.Time) Option {
return WithFormattedTime(t.UTC(), FileTimestampNoTZ)
}