Stricter datetime input
This commit is contained in:
parent
3109124a88
commit
ab87da256c
4 changed files with 51 additions and 8 deletions
11
helper.go
Normal file
11
helper.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
// Standard
|
||||
"time"
|
||||
)
|
||||
|
||||
func stringToTime(strTime string) (t time.Time, err error) {// {{{
|
||||
t, err = time.Parse(time.RFC3339, strTime)
|
||||
return
|
||||
}// }}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue