From 92e9b066f424c8e8055c01365bbd5e45e3c4f1b4 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 14 Oct 2025 05:00:03 -0500 Subject: attempt more time detection --- tablePB.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tablePB.go b/tablePB.go index 99102c1..b462613 100644 --- a/tablePB.go +++ b/tablePB.go @@ -5,7 +5,6 @@ package cobol import ( "fmt" "os" - "time" "go.wit.com/lib/protobuf/guipb" "go.wit.com/log" @@ -97,15 +96,16 @@ func getAnyCell(col *guipb.AnyCol, row int) (string, bool) { } return fmt.Sprintf("%d", finalInt), true - case guipb.ColAttr_DURATION: case guipb.ColAttr_TIME: + return "got to time", true + case guipb.ColAttr_DURATION: var sout string var tsProto timestamppb.Timestamp if err := anyVal.UnmarshalTo(&tsProto); err == nil { // It's a timestamp, now convert it back to a Go time.Time goTime := tsProto.AsTime() // fmt.Printf("Successfully unpacked timestamp: %v\n", goTime) - sout = FormatDuration(time.Since(goTime)) + sout = Since(goTime) return sout, true } return "", false -- cgit v1.2.3