MCPcopy
hub / github.com/spf13/cast / StringToDateInDefaultLocation

Function StringToDateInDefaultLocation

time.go:114–116  ·  view source on GitHub ↗

StringToDateInDefaultLocation casts an empty interface to a [time.Time], interpreting inputs without a timezone to be in the given location, or the local timezone if nil.

(s string, location *time.Location)

Source from the content-addressed store, hash-verified

112// interpreting inputs without a timezone to be in the given location,
113// or the local timezone if nil.
114func StringToDateInDefaultLocation(s string, location *time.Location) (time.Time, error) {
115 return internal.ParseDateWith(s, location, internal.TimeFormats)
116}

Callers 2

ToTimeInDefaultLocationEFunction · 0.85

Calls 1

ParseDateWithFunction · 0.92

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…