Skip to content

Commit

Permalink
revert err handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sk593 committed Sep 20, 2023
1 parent 9876f51 commit 3e2be59
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pkg/armrpc/api/v1/time_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ limitations under the License.
package v1

import (
"context"
"fmt"
"regexp"
"strings"
"time"

"github.com/radius-project/radius/pkg/ucp/ucplog"
)

const (
Expand Down Expand Up @@ -74,12 +70,8 @@ func (t *timeRFC3339) UnmarshalText(data []byte) (err error) {

// UnmarshalTimeString unmarshals a string representation of a time in RFC3339 format into a time.Time object.
func UnmarshalTimeString(ts string) *time.Time {
logger := ucplog.FromContextOrDiscard(context.Background())
var tt timeRFC3339
err := tt.UnmarshalText([]byte(ts))
if err != nil {
logger.Info(fmt.Sprintf("Invalid time string: '%s'. Using default value", ts))
}
_ = tt.UnmarshalText([]byte(ts))
return (*time.Time)(&tt)
}

Expand Down

0 comments on commit 3e2be59

Please sign in to comment.