Prepare reports for Promptkit migration
This commit is contained in:
@@ -90,14 +90,3 @@ func ParseLocalDate(value string, location *time.Location) (time.Time, error) {
|
||||
}
|
||||
return parsed, nil
|
||||
}
|
||||
|
||||
func ParseStormTime(value string, location *time.Location) (time.Time, error) {
|
||||
if parsed, err := time.Parse(time.RFC3339, value); err == nil {
|
||||
return parsed, nil
|
||||
}
|
||||
parsed, err := time.ParseInLocation(LocalDateTimeLayout, value, location)
|
||||
if err != nil {
|
||||
return time.Time{}, fmt.Errorf("parse storm time %q as YYYY-MM-DDTHH:MM or RFC3339: %w", value, err)
|
||||
}
|
||||
return parsed, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user