summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-14 05:00:03 -0500
committerJeff Carr <[email protected]>2025-10-14 05:00:03 -0500
commit92e9b066f424c8e8055c01365bbd5e45e3c4f1b4 (patch)
treea187651e7d824474567dba402b71e69d37f0af2b
parenta63a82e78a047c8dde14f106117b3ce88f209775 (diff)
attempt more time detection
-rw-r--r--tablePB.go6
1 files 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