-
-
Notifications
You must be signed in to change notification settings - Fork 0
mozrin edited this page Dec 14, 2025
·
1 revision
The Go wrapper provides CGO bindings for the Universal Timestamp library.
- Ensure the C library is installed or available.
- Get the package:
go get github.com/mozrin/universal_timestamp/wrappers/gopackage main
import (
"fmt"
uts "github.com/mozrin/universal_timestamp/wrappers/go"
)
func main() {
// Get current time
now := uts.Now()
fmt.Println(now.Format())
// Parse
ts, _ := uts.Parse("2024-12-14T12:00:00Z")
fmt.Printf("Nanos: %d\n", int64(ts))
}© 2025 Moztopia. Portions of this code and documentation are copyrighted.
All Rights Reserved.