mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update the kube dependencies to v1.25.4
this commit update the kube dependencies to latest v1.25.4. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
1ac0a17f5c
commit
165758e3a7
10
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go
generated
vendored
10
vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go
generated
vendored
@ -27,9 +27,12 @@ func (m *MicroTime) ProtoMicroTime() *Timestamp {
|
||||
if m == nil {
|
||||
return &Timestamp{}
|
||||
}
|
||||
|
||||
// truncate precision to microseconds to match JSON marshaling/unmarshaling
|
||||
truncatedNanoseconds := time.Duration(m.Time.Nanosecond()).Truncate(time.Microsecond)
|
||||
return &Timestamp{
|
||||
Seconds: m.Time.Unix(),
|
||||
Nanos: int32(m.Time.Nanosecond()),
|
||||
Nanos: int32(truncatedNanoseconds),
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +54,10 @@ func (m *MicroTime) Unmarshal(data []byte) error {
|
||||
if err := p.Unmarshal(data); err != nil {
|
||||
return err
|
||||
}
|
||||
m.Time = time.Unix(p.Seconds, int64(p.Nanos)).Local()
|
||||
|
||||
// truncate precision to microseconds to match JSON marshaling/unmarshaling
|
||||
truncatedNanoseconds := time.Duration(p.Nanos).Truncate(time.Microsecond)
|
||||
m.Time = time.Unix(p.Seconds, int64(truncatedNanoseconds)).Local()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user