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

第五章(缓存代码怎么写)中存在时区问题 #48

Open
Voolion opened this issue Apr 24, 2024 · 2 comments
Open

第五章(缓存代码怎么写)中存在时区问题 #48

Voolion opened this issue Apr 24, 2024 · 2 comments

Comments

@Voolion
Copy link

Voolion commented Apr 24, 2024

例如请求productList(使用grpc请求),
得到的缓存时间戳为1655511521,格式化后为2022-06-18 08:18:41
但是数据库存储的时间为2022-06-18 00:18:41,
这是因为时区存在问题,需要把所有涉及到time.Unix()地方规定时区

@kehuai007
Copy link

kehuai007 commented Apr 24, 2024 via email

@Voolion
Copy link
Author

Voolion commented Apr 24, 2024

image
示例

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