MCPcopy Create free account
hub / github.com/git-bug/git-bug / ParseTime

Function ParseTime

bridge/jira/client.go:33–39  ·  view source on GitHub ↗

ParseTime parse an RFC3339 string with nanoseconds

(timeStr string)

Source from the content-addressed store, hash-verified

31
32// ParseTime parse an RFC3339 string with nanoseconds
33func ParseTime(timeStr string) (time.Time, error) {
34 out, err := time.Parse(time.RFC3339Nano, timeStr)
35 if err != nil {
36 out, err = time.Parse(TimeFormat, timeStr)
37 }
38 return out, err
39}
40
41// Time is just a time.Time with a JSON serialization
42type Time struct {

Callers 1

UnmarshalJSONMethod · 0.85

Calls 1

ParseMethod · 0.65

Tested by

no test coverage detected