Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datatime存储到毫秒级时间精度丢失 #2753

Open
liwenson opened this issue Aug 8, 2024 · 2 comments
Open

datatime存储到毫秒级时间精度丢失 #2753

liwenson opened this issue Aug 8, 2024 · 2 comments

Comments

@liwenson
Copy link

liwenson commented Aug 8, 2024

重现步骤

表结构中datatime 长度设置为3 , credit_start_time datetime(3) NOT NULL COMMENT '有效期开始时间', 查询时精度不准确

预期外的结果

image
没有指定长度的显示正常.
mysql client查询是正常的
image

日志文本

No response

版本

1.10.0

部署方式

Docker

是否还有其他可以辅助定位问题的信息?比如数据库版本等

No response

@liwenson
Copy link
Author

liwenson commented Aug 8, 2024

发现使用pymysql 查询数据,也会丢失精度
datetime.datetime(2024, 4, 17, 0, 0), datetime.datetime(2024, 4, 22, 0, 0), 0, datetime.datetime(2023, 5, 4, 16, 11, 42), datetime.datetime(2023, 11, 24, 11, 4, 2)

@feiazifeiazi
Copy link
Contributor

@liwenson 现在不对吗。 我的是create_time(4),显示的结果:2024-05-23 16:30:32.828200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants