✨ Add UTC time-based generators
This commit is contained in:
parent
ee627547a8
commit
1af608d7c9
2 changed files with 19 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue