feat: add global system notices and Beijing order time display
Deploy olons-server production / deploy (push) Successful in 3m12s

This commit is contained in:
richjohnrambo
2026-10-22 21:56:07 +08:00
parent 9bb479b506
commit 8ce67648b1
22 changed files with 581 additions and 121 deletions
+8
View File
@@ -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')`
}