Your Question

gorm.io/gorm v1.23.2 // indirect

I need to set timezone UTC,so config NowFunc :

NowFunc: func() time.Time {
    return time.Now().UTC()
},

log in gorm:

[2.116ms] [rows:1] INSERT INTO `rwup_config` (`created_at`,`updated_at`,`name`,`
k`,`v`,`data_type`) VALUES ('2022-03-03 16:00:03.664','2022-03-03 16:00:03.664',
'test','kk','vv','string')

but log in mysql bin-log:

INSERT INTO `rwup_config` (`created_at`,`updated_at`,`name`,`k`,`v`,`data_type`) VALUES ('2022-03-04 00:00:03.6642391','2022-03-04 00:00:03.6642391','test','kk','vv','string')

The document you expected this should be explained

No

Expected answer

this is a bug?

Comment From: jinzhu

time zone.