From 978fc81536452192a6aed000357c12bcf2d512db Mon Sep 17 00:00:00 2001 From: nolouch Date: Tue, 11 Sep 2018 17:52:54 +0800 Subject: [PATCH] pdctl: more precise tso time decoding --- pdctl/command/tso_command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdctl/command/tso_command.go b/pdctl/command/tso_command.go index 8a99e43d467..10189e08452 100644 --- a/pdctl/command/tso_command.go +++ b/pdctl/command/tso_command.go @@ -48,7 +48,7 @@ func showTSOCommandFunc(cmd *cobra.Command, args []string) { } logical := ts & logicalBits physical := ts >> physicalShiftBits - physicalTime := time.Unix(int64(physical/1000), 0) + physicalTime := time.Unix(int64(physical/1000), int64(physical%1000)*time.Millisecond.Nanoseconds()) fmt.Println("system: ", physicalTime) fmt.Println("logic: ", logical) }