feat: add global system notices and Beijing order time display
Deploy olons-server production / deploy (push) Successful in 3m12s
Deploy olons-server production / deploy (push) Successful in 3m12s
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package store
|
||||
|
||||
// databaseWallTimeUTC normalizes DATETIME values written by CURRENT_TIMESTAMP.
|
||||
// The database session can use UTC or Beijing time independently of the Go process.
|
||||
// Do not use it for fields explicitly written as UTC by application code.
|
||||
func databaseWallTimeUTC(column string) string {
|
||||
return `DATE_FORMAT(TIMESTAMPADD(SECOND,TIMESTAMPDIFF(SECOND,NOW(),UTC_TIMESTAMP()),` + column + `),'%Y-%m-%dT%H:%i:%sZ')`
|
||||
}
|
||||
Reference in New Issue
Block a user