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

[plugin-datetime] Support timezone in 'toEpochSecond' expression #1219

Merged
merged 1 commit into from
Dec 14, 2020

Conversation

valfirst
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Dec 11, 2020

Codecov Report

Merging #1219 (cd354ee) into master (d01dd7d) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1219      +/-   ##
============================================
- Coverage     95.45%   95.45%   -0.01%     
+ Complexity     4870     4868       -2     
============================================
  Files           649      649              
  Lines         13297    13296       -1     
  Branches        961      961              
============================================
- Hits          12693    12692       -1     
  Misses          474      474              
  Partials        130      130              
Impacted Files Coverage Δ Complexity Δ
...idus/bdd/expression/EpochExpressionProcessors.java 100.00% <100.00%> (ø) 3.00 <1.00> (ø)
...time/src/main/java/org/vividus/util/DateUtils.java 100.00% <100.00%> (ø) 4.00 <1.00> (-2.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d01dd7d...cd354ee. Read the comment docs.

@@ -32,7 +32,7 @@ public EpochExpressionProcessors(DateUtils dateUtils)
{
super(List.of(
new UnaryExpressionProcessor("toEpochSecond",
arg -> String.valueOf(dateUtils.toEpochSecond(arg, DateTimeFormatter.ISO_DATE_TIME))),
arg -> String.valueOf(dateUtils.parseDateTime(arg, DateTimeFormatter.ISO_DATE_TIME).toEpochSecond())),
new UnaryExpressionProcessor("fromEpochSecond",
arg -> DateTimeFormatter.ISO_DATE_TIME.format(dateUtils.fromEpochSecond(parseLong(arg))))
));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't you mind to add docs for these expressions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that will be added in another PR

@valfirst valfirst force-pushed the support-timezone-in-to-epoch-second-expression branch from b254825 to abedbc4 Compare December 12, 2020 19:59
@valfirst valfirst force-pushed the support-timezone-in-to-epoch-second-expression branch from abedbc4 to cd354ee Compare December 13, 2020 21:12
@sonarcloud
Copy link

sonarcloud bot commented Dec 13, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@uarlouski uarlouski self-requested a review December 14, 2020 09:17
@valfirst valfirst merged commit f31ccc3 into master Dec 14, 2020
@valfirst valfirst deleted the support-timezone-in-to-epoch-second-expression branch December 14, 2020 12:01
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.

2 participants