mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
chore: fully implement enterprise audit pkg (#3821)
This commit is contained in:
@@ -4,5 +4,11 @@ import "time"
|
||||
|
||||
// Now returns a standardized timezone used for database resources.
|
||||
func Now() time.Time {
|
||||
return time.Now().UTC()
|
||||
return Time(time.Now().UTC())
|
||||
}
|
||||
|
||||
// Time returns a time compatible with Postgres. Postgres only stores dates with
|
||||
// microsecond precision.
|
||||
func Time(t time.Time) time.Time {
|
||||
return t.Round(time.Microsecond)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user