From 54d0a83eee2b0838b03ca7366be81e8c7c19c289 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 24 Jun 2022 15:42:30 +0800 Subject: [PATCH] use local time instead of UTC --- pkg/service/trade.go | 2 +- pkg/types/order.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/service/trade.go b/pkg/service/trade.go index eaf782de1..bf11f8a0a 100644 --- a/pkg/service/trade.go +++ b/pkg/service/trade.go @@ -147,7 +147,7 @@ func (s *TradeService) QueryTradingVolume(startTime time.Time, options TradingVo return records, err } - record.Time = time.Date(record.Year, time.Month(record.Month), record.Day, 0, 0, 0, 0, time.UTC) + record.Time = time.Date(record.Year, time.Month(record.Month), record.Day, 0, 0, 0, 0, time.Local) records = append(records, record) } diff --git a/pkg/types/order.go b/pkg/types/order.go index f560e165a..dbebd745d 100644 --- a/pkg/types/order.go +++ b/pkg/types/order.go @@ -242,8 +242,8 @@ func (o Order) CsvRecords() [][]string { string(o.Status), o.Price.String(), o.Quantity.String(), - o.CreationTime.Time().UTC().Format(time.RFC1123), - o.UpdateTime.Time().UTC().Format(time.RFC1123), + o.CreationTime.Time().Format(time.RFC1123), + o.UpdateTime.Time().Format(time.RFC1123), }, } }