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

refactor: change format date function #341

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

xdlbdy
Copy link
Contributor

@xdlbdy xdlbdy commented Dec 15, 2022

Signed-off-by: delu [email protected]

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary

What is changed and how does it work?

  • change function format_date to date_format
  • function date_format remove fromFormat param which use default format RFC3339, and add param timeZone which default is UTC
  • change function format_unix_time to unix_time_format
  • unix_time_format add param timeZone which default is UTC
  • change date format from YYYY-mm-dd HH:MM:SS to Y-m-d H:i:s

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

@xdlbdy xdlbdy requested a review from wenfengwang as a code owner December 15, 2022 03:04
@codecov
Copy link

codecov bot commented Dec 15, 2022

Codecov Report

Merging #341 (1b48cae) into main (09f3748) will increase coverage by 0.21%.
The diff coverage is 62.36%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #341      +/-   ##
==========================================
+ Coverage   62.72%   62.93%   +0.21%     
==========================================
  Files         133      144      +11     
  Lines       12128    13121     +993     
==========================================
+ Hits         7607     8258     +651     
- Misses       3977     4283     +306     
- Partials      544      580      +36     
Impacted Files Coverage Δ
internal/primitive/vanus/id.go 19.84% <0.00%> (-0.49%) ⬇️
internal/raft/log/wal.go 100.00% <ø> (ø)
internal/store/block/raft/appender.go 0.00% <0.00%> (ø)
internal/store/block/raft/snapshot.go 0.00% <0.00%> (ø)
internal/store/block/raft/transport.go 0.00% <0.00%> (ø)
internal/store/io/file_linux.go 0.00% <0.00%> (ø)
internal/store/segment/server.go 13.32% <0.00%> (-0.11%) ⬇️
internal/store/vsb/block.go 46.34% <0.00%> (ø)
internal/store/vsb/block_seek.go 0.00% <0.00%> (ø)
internal/store/vsb/engine_open.go 3.44% <0.00%> (-0.13%) ⬇️
... and 66 more

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 9969088...1b48cae. Read the comment docs.

Copy link
Contributor

@wenfengwang wenfengwang left a comment

Choose a reason for hiding this comment

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

LGTM

@wenfengwang wenfengwang merged commit c5c27d3 into vanus-labs:main Dec 15, 2022
wenfengwang pushed a commit that referenced this pull request Mar 23, 2023
* refactor: change format date function

Signed-off-by: delu <[email protected]>

* feat: separate function ut

Signed-off-by: delu <[email protected]>

Signed-off-by: delu <[email protected]>
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