mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Vendor latest c/image
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
8
vendor/github.com/go-openapi/strfmt/time.go
generated
vendored
8
vendor/github.com/go-openapi/strfmt/time.go
generated
vendored
@ -76,6 +76,8 @@ const (
|
||||
ISO8601TimeWithReducedPrecisionLocaltime = "2006-01-02T15:04"
|
||||
// ISO8601TimeUniversalSortableDateTimePattern represents a ISO8601 universal sortable date time pattern.
|
||||
ISO8601TimeUniversalSortableDateTimePattern = "2006-01-02 15:04:05"
|
||||
// short form of ISO8601TimeUniversalSortableDateTimePattern
|
||||
ISO8601TimeUniversalSortableDateTimePatternShortForm = "2006-01-02"
|
||||
// DateTimePattern pattern to match for the date-time format from http://tools.ietf.org/html/rfc3339#section-5.6
|
||||
DateTimePattern = `^([0-9]{2}):([0-9]{2}):([0-9]{2})(.[0-9]+)?(z|([+-][0-9]{2}:[0-9]{2}))$`
|
||||
)
|
||||
@ -84,7 +86,7 @@ var (
|
||||
rxDateTime = regexp.MustCompile(DateTimePattern)
|
||||
|
||||
// DateTimeFormats is the collection of formats used by ParseDateTime()
|
||||
DateTimeFormats = []string{RFC3339Micro, RFC3339MicroNoColon, RFC3339Millis, RFC3339MillisNoColon, time.RFC3339, time.RFC3339Nano, ISO8601LocalTime, ISO8601TimeWithReducedPrecision, ISO8601TimeWithReducedPrecisionLocaltime, ISO8601TimeUniversalSortableDateTimePattern}
|
||||
DateTimeFormats = []string{RFC3339Micro, RFC3339MicroNoColon, RFC3339Millis, RFC3339MillisNoColon, time.RFC3339, time.RFC3339Nano, ISO8601LocalTime, ISO8601TimeWithReducedPrecision, ISO8601TimeWithReducedPrecisionLocaltime, ISO8601TimeUniversalSortableDateTimePattern, ISO8601TimeUniversalSortableDateTimePatternShortForm}
|
||||
|
||||
// MarshalFormat sets the time resolution format used for marshaling time (set to milliseconds)
|
||||
MarshalFormat = RFC3339Millis
|
||||
@ -245,7 +247,7 @@ func (t DateTime) MarshalBSONValue() (bsontype.Type, []byte, error) {
|
||||
buf := make([]byte, 8)
|
||||
binary.LittleEndian.PutUint64(buf, uint64(i64))
|
||||
|
||||
return bsontype.DateTime, buf, nil
|
||||
return bson.TypeDateTime, buf, nil
|
||||
}
|
||||
|
||||
// UnmarshalBSONValue is an interface implemented by types that can unmarshal a
|
||||
@ -253,7 +255,7 @@ func (t DateTime) MarshalBSONValue() (bsontype.Type, []byte, error) {
|
||||
// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it
|
||||
// wishes to retain the data after returning.
|
||||
func (t *DateTime) UnmarshalBSONValue(tpe bsontype.Type, data []byte) error {
|
||||
if tpe == bsontype.Null {
|
||||
if tpe == bson.TypeNull {
|
||||
*t = DateTime{}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user