Compare commits
4 commits
83790d0f18
...
f1045646c3
Author | SHA1 | Date | |
---|---|---|---|
f1045646c3 | |||
371f1f5e78 | |||
7441206c30 | |||
7fd4d95367 |
2 changed files with 6 additions and 4 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
"encoding/json"
|
||||
"github.com/jinzhu/now"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
@ -48,7 +49,7 @@ var exportCmd = &cobra.Command{
|
|||
var untilTime time.Time
|
||||
|
||||
if since != "" {
|
||||
sinceTime, err = time.Parse(time.RFC3339, since)
|
||||
sinceTime, err = now.Parse(since)
|
||||
if err != nil {
|
||||
fmt.Printf("%s %+v\n", CharError, err)
|
||||
os.Exit(1)
|
||||
|
@ -56,7 +57,7 @@ var exportCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
if until != "" {
|
||||
untilTime, err = time.Parse(time.RFC3339, until)
|
||||
untilTime, err = now.Parse(until)
|
||||
if err != nil {
|
||||
fmt.Printf("%s %+v\n", CharError, err)
|
||||
os.Exit(1)
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/jinzhu/now"
|
||||
"github.com/shopspring/decimal"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -32,7 +33,7 @@ var listCmd = &cobra.Command{
|
|||
var untilTime time.Time
|
||||
|
||||
if since != "" {
|
||||
sinceTime, err = time.Parse(time.RFC3339, since)
|
||||
sinceTime, err = now.Parse(since)
|
||||
if err != nil {
|
||||
fmt.Printf("%s %+v\n", CharError, err)
|
||||
os.Exit(1)
|
||||
|
@ -40,7 +41,7 @@ var listCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
if until != "" {
|
||||
untilTime, err = time.Parse(time.RFC3339, until)
|
||||
untilTime, err = now.Parse(until)
|
||||
if err != nil {
|
||||
fmt.Printf("%s %+v\n", CharError, err)
|
||||
os.Exit(1)
|
||||
|
|
Loading…
Reference in a new issue