cmd/tailscale/cli: use tstime constant for tailscale routecheck (#19957)
Updates #19928 Signed-off-by: Simon Law <sfllaw@tailscale.com>
This commit is contained in:
@@ -18,7 +18,9 @@ import (
|
|||||||
jsonv2 "github.com/go-json-experiment/json"
|
jsonv2 "github.com/go-json-experiment/json"
|
||||||
"github.com/go-json-experiment/json/jsontext"
|
"github.com/go-json-experiment/json/jsontext"
|
||||||
"github.com/peterbourgon/ff/v3/ffcli"
|
"github.com/peterbourgon/ff/v3/ffcli"
|
||||||
|
|
||||||
"tailscale.com/net/routecheck"
|
"tailscale.com/net/routecheck"
|
||||||
|
"tailscale.com/tstime"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -106,7 +108,7 @@ func printRouteCheckReport(rp *routecheck.Report) error {
|
|||||||
|
|
||||||
w := tabwriter.NewWriter(Stdout, 10, 5, 5, ' ', 0)
|
w := tabwriter.NewWriter(Stdout, 10, 5, 5, ' ', 0)
|
||||||
defer w.Flush()
|
defer w.Flush()
|
||||||
fmt.Fprintf(w, "\nReachable routers at %s:\n", rp.Done.Local().Format(time.DateTime+"Z07:00"))
|
fmt.Fprintf(w, "\nReachable routers at %s:\n", rp.Done.Local().Format(tstime.DateSpTimeZ))
|
||||||
fmt.Fprintf(w, "\n %s\t%s\t%s", "PREFIX", "IP", "HOSTNAME")
|
fmt.Fprintf(w, "\n %s\t%s\t%s", "PREFIX", "IP", "HOSTNAME")
|
||||||
for prefix, nodes := range routes.Sorted() {
|
for prefix, nodes := range routes.Sorted() {
|
||||||
slices.SortFunc(nodes, func(a, b routecheck.Node) int {
|
slices.SortFunc(nodes, func(a, b routecheck.Node) int {
|
||||||
|
|||||||
Reference in New Issue
Block a user