Skip to content

Conversation

@Dove02
Copy link

@Dove02 Dove02 commented Jul 28, 2025

问题背景

当前 parseTime 函数在处理带有微秒的时间字符串时,只能正确去除固定三位数的微秒部分(如 .123),
对于任意长度的微秒(如 .123456)无法正确处理,导致前端时间显示异常。

修改内容

  • 优化正则表达式,将去除微秒部分的正则从 /\.[\d]{3}/gm 改为 /\.\d+/gm

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

Successfully merging this pull request may close these issues.

1 participant