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

port: Support timestamp without timezone postfix in getTimeOfDay #3639

Merged
merged 4 commits into from
May 6, 2021

Conversation

Danieladu
Copy link
Contributor

Fixes #3638

Cause of the issue

  • The input of datetime functions (like getTimeOfDay), only accepts the original datetime format("yyyy-MM-ddTHH:mm:ss.fffZ")
  • The output format of convertFromUTC was changed from "yyyy-MM-ddTHH:mm:ss.fffZ" to "yyyy-MM-ddTHH:mm:ss.fffffffK" in R12, which is correct because a time converted from UTC should no longer have the "Z" postfix. This is also aligned with WDL's convention.
  • Then the result of convertFromUTC doesn't fit in the input of getTimeOfDay, error occurs.

In a summary, the current datetime functions input format is too strict.

Changes

Expand the input of date time functions to cover the case of timestamp without timezone postfix.

@coveralls
Copy link

coveralls commented Apr 28, 2021

Pull Request Test Coverage Report for Build 815502809

  • 24 of 25 (96.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.003%) to 85.434%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/adaptive-expressions/src/builtinFunctions/getTimeOfDay.ts 23 24 95.83%
Files with Coverage Reduction New Missed Lines %
libraries/botbuilder-lg/src/templateExtensions.ts 1 84.48%
Totals Coverage Status
Change from base Build 815502491: -0.003%
Covered Lines: 19225
Relevant Lines: 21402

💛 - Coveralls

@joshgummersall
Copy link
Contributor

@Danieladu what's the status of this?

@Danieladu
Copy link
Contributor Author

I have marked it as "Ready for review"

@Danieladu Danieladu marked this pull request as ready for review May 6, 2021 02:42
@Danieladu Danieladu requested review from a team as code owners May 6, 2021 02:42
@joshgummersall joshgummersall merged commit 5924f66 into main May 6, 2021
@joshgummersall joshgummersall deleted the hond/getTimeOfDay branch May 6, 2021 15:43
stevengum added a commit that referenced this pull request May 10, 2021
* fix: conflict -> precondition failed (#3645)

Fixes #3644

* Support timestamp without timezone postfix in getTimeOfDay (#3639)

* fix: add @types/express (#3652)

Co-authored-by: Steven Gum <14935595+stevengum@users.noreply.github.com>

* fix: config file overrides (#3660)

Fixes #3659

* fix: add msbot keywords to component packages (#3657)

Fixes #3656

* port: telemetry pii settings path (#3665)

Fixes #3663

Co-authored-by: Hongyang Du (hond) <hond@microsoft.com>
Co-authored-by: Steven Gum <14935595+stevengum@users.noreply.github.com>
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.

port: Support timestamp without timezone postfix in getTimeOfDay (#5551)
3 participants