remove requirement for timezone as GCS returns timestamp in local time to the region it is in

This commit is contained in:
Pavel Tumik 2020-10-14 20:51:02 -07:00
parent 266c6e5442
commit ac4eb350d9
3 changed files with 7 additions and 9 deletions

View File

@ -122,10 +122,9 @@ spec:
type: string type: string
timestamp: timestamp:
type: string type: string
pattern: '^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([+-]([01][0-9]|2[0-3]):[0-5][0-9]))$' pattern: '^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?.*$'
# The regexp matches the date-time format (RFC 3339 Section 5.6) that specifies a timezone as an offset relative to UTC # The regexp matches the date-time format
# Example: 1996-12-19T16:39:57-08:00 # Example: 1996-12-19T16:39:57
# Note: this field requires a timezone
uid: uid:
format: uuid format: uuid
type: string type: string

View File

@ -118,10 +118,9 @@ spec:
type: string type: string
timestamp: timestamp:
type: string type: string
pattern: '^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([+-]([01][0-9]|2[0-3]):[0-5][0-9]))$' pattern: '^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?.*$'
# The regexp matches the date-time format (RFC 3339 Section 5.6) that specifies a timezone as an offset relative to UTC # The regexp matches the date-time format
# Example: 1996-12-19T16:39:57-08:00 # Example: 1996-12-19T16:39:57
# Note: this field requires a timezone
uid: uid:
format: uuid format: uuid
type: string type: string

View File

@ -169,7 +169,7 @@ var PostgresCRDResourceValidation = apiextv1beta1.CustomResourceValidation{
"timestamp": { "timestamp": {
Type: "string", Type: "string",
Description: "Date-time format that specifies a timezone as an offset relative to UTC e.g. 1996-12-19T16:39:57-08:00", Description: "Date-time format that specifies a timezone as an offset relative to UTC e.g. 1996-12-19T16:39:57-08:00",
Pattern: "^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(([Zz])|([+-]([01][0-9]|2[0-3]):[0-5][0-9]))$", Pattern: "^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?.*$",
}, },
"uid": { "uid": {
Type: "string", Type: "string",