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
feat: add timezone_to_second/1 function to rule engine #10858
Merged
kjellwinblad
merged 3 commits into
emqx:master
from
kjellwinblad:kjell/rule_engine_funcs/add_timezone_to_second/EMQX-10058
May 30, 2023
Merged
feat: add timezone_to_second/1 function to rule engine #10858
kjellwinblad
merged 3 commits into
emqx:master
from
kjellwinblad:kjell/rule_engine_funcs/add_timezone_to_second/EMQX-10058
May 30, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds the functions timezone_to_offset_seconds and its alias timezone_to_second to the rule engine. As the names suggests, these functions convert a timzone offset string such as "+02:00", "Z", "local" to an integer representing how many seconds that the given timezone differs from UTC. timezone_to_offset_seconds is the one of the two functions that should be advertised while timezone_to_second in kept for backwards compatibility with 4.X. Fixes: https://emqx.atlassian.net/browse/EMQX-10058
zmstone
previously approved these changes
May 29, 2023
qzhuyan
previously approved these changes
May 29, 2023
thalesmg
previously approved these changes
May 29, 2023
paulozulato
previously approved these changes
May 29, 2023
kjellwinblad
dismissed stale reviews from paulozulato, thalesmg, qzhuyan, and zmstone
via
May 29, 2023 15:21
354603d
Sorry, the test suite was broken but has been fixed by this commit (354603d) so I need another approval. |
Pull Request Test Coverage Report for Build 5113281055
💛 - Coveralls |
zmstone
approved these changes
May 30, 2023
Enhancements
|
增强
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds the functions
timezone_to_offset_seconds
and its aliastimezone_to_second
to the rule engine. As the names suggests, these functions convert a timzone offset string such as "+02:00", "Z", "local" to an integer representing how many seconds that the given timezone differs from UTC.timezone_to_offset_seconds
is the one of the two functions that should be advertised whiletimezone_to_second
in kept for backwards compatibility with 4.X.Fixes:
https://emqx.atlassian.net/browse/EMQX-10058
Summary
🤖 Generated by Copilot at 995025b
Added timezone conversion functions and tests to
emqx_rule_funcs
and updatedemqx_machine
version.PR Checklist
Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:
changes/{ce,ee}/(feat|perf|fix)-<PR-id>.en.md
files