parse

package
v0.90.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "parse <unix>",
	Short: "Parse time to various formats",
	Args:  cobra.ExactArgs(1),
	Run: func(c *cobra.Command, args []string) {
		unixTimeInt, err := strconv.Atoi(args[0])
		if err != nil {
			log.Fatalf("Error parsing unix time: %v\n", err)
		}
		t := time.Unix(int64(unixTimeInt), 0)
		fmt.Println(t.Format(time.RFC3339))
		fmt.Println(t.UTC().Format(time.RFC3339))
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL