-
Notifications
You must be signed in to change notification settings - Fork 6k
timer: fix some timezone behavior in timer framework #51783
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
Conversation
Hi @lcwangchao. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -148,12 +148,27 @@ func (s *tableTimerStoreCore) List(ctx context.Context, cond api.Cond) ([]*api.T | |||
timerData = row.GetBytes(3) | |||
} | |||
|
|||
tz := row.GetString(4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use a separated tzParse
, rather than use tz
directly here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because tz
will be assigned to TimerSpec.TimeZone
but tzParse
is used to parse the real location.
For example, if user created a timer with time zone "" (an empty string, means to use database timezone). The returned TimerSpec.TimeZone
should also be an empty, but we should use a valid time zone string to parse it to time.Location
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #51783 +/- ##
================================================
+ Coverage 70.7253% 72.8265% +2.1012%
================================================
Files 1476 1476
Lines 437498 438609 +1111
================================================
+ Hits 309422 319424 +10002
+ Misses 108689 99147 -9542
- Partials 19387 20038 +651
Flags with carried forward coverage won't be shown. Click here to find out more.
|
bf29481
to
5c04802
Compare
5c04802
to
fa945e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bb7133, YangKeao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: close #51768
What changed and how does it work?
TimerRecord
, their location should be same with theTimerRecord.Location
fieldCheck List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.