MCPcopy
hub / github.com/robfig/cron / getTimeTZ

Function getTimeTZ

spec_test.go:275–291  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

273}
274
275func getTimeTZ(value string) time.Time {
276 if value == "" {
277 return time.Time{}
278 }
279 t, err := time.Parse("Mon Jan 2 15:04 2006", value)
280 if err != nil {
281 t, err = time.Parse("Mon Jan 2 15:04:05 2006", value)
282 if err != nil {
283 t, err = time.Parse("2006-01-02T15:04:05-0700", value)
284 if err != nil {
285 panic(err)
286 }
287 }
288 }
289
290 return t
291}
292
293// https://github.com/robfig/cron/issues/144
294func TestSlash0NoHang(t *testing.T) {

Callers 1

TestNextWithTzFunction · 0.85

Calls 1

ParseMethod · 0.65

Tested by

no test coverage detected