mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
types: improve order string format
This commit is contained in:
parent
8314a7e750
commit
4b78bfcdfa
|
@ -336,10 +336,12 @@ func (o Order) String() string {
|
|||
|
||||
desc += " | " + string(o.Status) + " | "
|
||||
|
||||
desc += time.Time(o.CreationTime).UTC().Format(time.StampMilli)
|
||||
|
||||
if time.Time(o.UpdateTime).IsZero() {
|
||||
desc += "0/" + time.Time(o.CreationTime).UTC().Format(time.StampMilli)
|
||||
desc += " -> 0"
|
||||
} else {
|
||||
desc += time.Time(o.UpdateTime).UTC().Format(time.StampMilli) + "/" + time.Time(o.CreationTime).UTC().Format(time.StampMilli)
|
||||
desc += " -> " + time.Time(o.UpdateTime).UTC().Format(time.StampMilli)
|
||||
}
|
||||
|
||||
return desc
|
||||
|
|
Loading…
Reference in New Issue
Block a user