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

Bugfix/time compute #12

Merged
merged 3 commits into from
Aug 1, 2021
Merged

Conversation

berstpander
Copy link
Contributor

fix mainly the bug of time calculation and refacor some functions related to time calculation

  1. 修改increment函数,通过调用系统的时间计算方法取代将年月日转换为秒的计算方式,修复了时间计算的不准确的漏洞
  2. 添加GenerateTimeItems函数替代GenerateIntItems函数,以修复生成时间格式的序列时的计算不准确的漏洞
  3. 重构了increment函数,拆出解析时间的表达式(parseTsExpr)和带单位进行时间运算(incrementUnit)两个子功能函数
  4. 重构了parseTsSection函数,并把解析步长的部分直接替换为调用parseTsExpr函数,精简了代码
  5. 修复了无法生成逆序的时间序列的问题

refactor increment function and fix the way of time calculation
add GenerateTimeItems function for time generate to replace GenerateIntItems function
modify the parse process of step
modify the code to romove unnecessary 'if'
@aaronchen2k aaronchen2k merged commit 7f91d10 into easysoft:master Aug 1, 2021
@berstpander berstpander deleted the bugfix/time_compute branch August 26, 2021 12:53
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.

None yet

2 participants