From 2abb9b38cce34e4a2a27964270839b4ac30303b6 Mon Sep 17 00:00:00 2001 From: Marina Biryukova Date: Wed, 24 Jul 2024 16:21:53 +0300 Subject: [PATCH] [#42] Change valid time format for lifecycle configuration Signed-off-by: Marina Biryukova --- api/handler/lifecycle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/handler/lifecycle.go b/api/handler/lifecycle.go index 60bdce0..624859d 100644 --- a/api/handler/lifecycle.go +++ b/api/handler/lifecycle.go @@ -160,7 +160,7 @@ func checkLifecycleConfiguration(cfg *data.LifecycleConfiguration) error { return fmt.Errorf("expiration days must be a positive integer: %d", *rule.Expiration.Days) } - if _, err := time.Parse("2006-01-02T15:04:05.000Z", rule.Expiration.Date); rule.Expiration.Date != "" && err != nil { + if _, err := time.Parse("2006-01-02T15:04:05Z", rule.Expiration.Date); rule.Expiration.Date != "" && err != nil { return fmt.Errorf("invalid value of expiration date: %s", rule.Expiration.Date) } }