15 lines
371 B
Go
15 lines
371 B
Go
package billingsync
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
// TestBillingYesterdayAt 验证 UTC 服务器按中国业务时区计算昨日。 // Logan.Li
|
|
func TestBillingYesterdayAt(t *testing.T) {
|
|
now := time.Date(2026, 7, 28, 21, 30, 0, 0, time.UTC)
|
|
if got := billingYesterdayAt(now); got != "2026-07-28" {
|
|
t.Fatalf("昨日日期错误: got=%s want=2026-07-28", got)
|
|
}
|
|
}
|