### Is there an existing issue for the same bug? - [X] I have checked the existing issues. ### Environment ```Markdown - Version or commit-id (e.g. v0.1.0 or 8b23a93): - Hardware parameters: - OS type: - Others: ``` ### Actual Behavior make ut reports following failed cases when the machine's timezone is not set to UTC. # FAILED CASES: --- FAIL: TestUnix (0.00s) --- FAIL: TestCastIntegerAsTimestamp (0.00s) --- FAIL: TestFromUnixTimestamp (0.00s) --- FAIL: TestUnixTimestamp (0.00s) e.g. on a machine with its timezone set to CST +8000, I got - ``` === RUN TestUnix datetime_test.go:313: UnixTimestamp want -452961506 but got -452990306 datetime_test.go:313: UnixTimestamp want 1327483294 but got 1327454494 ``` It works fine on machines with timezone set to UTC. @reusee mentioned that time.UTC().UnixTimestamp() should be used. ### Expected Behavior _No response_ ### Steps to Reproduce _No response_ ### Additional information _No response_
Activity
aptend commentedon Jul 19, 2022
the fix has been merged, @lni doctor please have a try in your local machine~
aressu1985 commentedon Oct 30, 2022
fixed