gogf / gf

GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
https://goframe.org
MIT License
11.79k stars 1.61k forks source link

os/gtime: issue title #3960

Open lvdoubaobao opened 1 week ago

lvdoubaobao commented 1 week ago

Go version

go1.20.2 windows

GoFrame version

v2.6.3

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

双语对照 编辑译文 执行insert方法的时候 created_at 时间为Y-m-d H:i:s 但是mysql显示错误为 INSERT INTO zutai(guid,created_at,user_id,device_zt_data,page_name,page_size,page_image,status) VALUES('1601d7f5-660d-483c-b6f7-203962fa2348','2024-11-21 14:48:42',2,'{"name":"--","layer":{"backColor":"","backgroundImage":"","widthHeightRatio":"","width":1920,"height":1080},"components":[],"WebTopoGuid":"e7c095c6-bece-019e-7bd5-b7a2275cbf27"}','测试222-副本-副本','960x600','/uploads/image/2a0720bc-d097-418a-bb64-7a9948814f65_1.png','') : Error 1292 (22007): Incorrect datetime value: '2024-11-21 14:48:42.2847942' for column 'created_at' at row 1, 有什么地方能改变这个时间精度么 615/10000 实时翻译 划译 When executing the insert method, the creatd_at time is Y-m-d H: i: s, but MySQL displays an error message of Inserting into zutai (guide, creatd_at, user_i, Device_zt_data, page_2, page_2, page_2, status) VALUES ('1601d7f5-660d-483c-b6f7-203962fa2348 ','2024-11-21 14:48:42', 2, '{name': '--', 'layer': {'backColor': '' ',' backgroundImage ':' '', 'widthHeightRatio': '' ',' width ': 1920},' height ': 1080},' components': [], 'WebTopoUID': "e7c095c6-bece-019e-7bd5-b7a2275cbf27", "Test 222 Copy Copy", "960x600", "/uploads/image/2a0720bc-d097-418a-bb64-7a9948814f65_1. png", ""): Error 1292 (22007): Incorrect timestamp value: "2024-11-21 14:48:42.2847942" for column "creatd_at" at row 1, is there any way to change this time accuracy

What did you see happen?

INSERT INTO zutai(guid,created_at,user_id,device_zt_data,page_name,page_size,page_image,status) VALUES('1601d7f5-660d-483c-b6f7-203962fa2348','2024-11-21 14:48:42',2,'{"name":"--","layer":{"backColor":"","backgroundImage":"","widthHeightRatio":"","width":1920,"height":1080},"components":[],"WebTopoGuid":"e7c095c6-bece-019e-7bd5-b7a2275cbf27"}','测试222-副本-副本','960x600','/uploads/image/2a0720bc-d097-418a-bb64-7a9948814f65_1.png','') : Error 1292 (22007): Incorrect datetime value: '2024-11-21 14:48:42.2847942' for column 'created_at' at row 1

What did you expect to see?

success

gqcn commented 1 week ago

@lvdoubaobao Please use the latest version of goframe. If the issue persists, please provide the minimal reproducible source code for the problem.