mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #61553 from hongchaodeng/time
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. meta/v1: check error from json.Unmarshal() Release note: ``` NONE ```
This commit is contained in:
commit
433c01a7b7
@ -106,7 +106,10 @@ func (t *Time) UnmarshalJSON(b []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var str string
|
var str string
|
||||||
json.Unmarshal(b, &str)
|
err := json.Unmarshal(b, &str)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
pt, err := time.Parse(time.RFC3339, str)
|
pt, err := time.Parse(time.RFC3339, str)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user