cmd: use time.Local for the local timezone

This commit is contained in:
c9s 2022-01-12 15:33:04 +08:00
parent b3b1161ecc
commit 8c2228f428
2 changed files with 2 additions and 6 deletions

View File

@ -64,12 +64,7 @@ var SyncCmd = &cobra.Command{
)
if len(since) > 0 {
loc, err := time.LoadLocation("Local")
if err != nil {
return err
}
startTime, err = time.ParseInLocation("2006-01-02", since, loc)
startTime, err = time.ParseInLocation("2006-01-02", since, time.Local)
if err != nil {
return err
}

View File

@ -732,6 +732,7 @@ func (e *Exchange) QueryTrades(ctx context.Context, symbol string, options *type
}
// MAX uses exclusive last trade ID
// the timestamp parameter is used for reverse order, we can't use it.
if options.LastTradeID > 0 {
req.From(int64(options.LastTradeID))
}