We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
最近在查看数据库中的内容时,发现一个用于记录日期的字段,所记录的日期并不是以中国所在的东八区为基准进行记录的,而是以格林威治标准时间为基准进行记录的,这样所记录的日期有可能比实际的国内日期要玩一天。
采用 dayjs 这个库来解析时间,问题就解决了。
因为 dayjs 这个库默认会使用计算机所在地区的本地时间,所以用这个库来实现所有时间相关的需求,就不会有时区问题了。
By default, Day.js parses and displays in local time.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题描述
最近在查看数据库中的内容时,发现一个用于记录日期的字段,所记录的日期并不是以中国所在的东八区为基准进行记录的,而是以格林威治标准时间为基准进行记录的,这样所记录的日期有可能比实际的国内日期要玩一天。
解决方案
采用 dayjs 这个库来解析时间,问题就解决了。
因为 dayjs 这个库默认会使用计算机所在地区的本地时间,所以用这个库来实现所有时间相关的需求,就不会有时区问题了。
The text was updated successfully, but these errors were encountered: