timestamp

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: Apache-2.0 Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentTime

func CurrentTime(precision string) string

CurrentTime - This function will return the current time in the STIX timestamp format, which is in RFC 3339 format. The options are "milli", "micro", or "" which will give you to the second.

func ToString

func ToString(t interface{}, p string) (string, error)

ToString - This function takes in a timestamp in either time.Time or string format and returns a string version of the timestamp.

func Valid

func Valid(t string) bool

Valid - This function will return true if the timestamp is a valid STIX timestamp, just the date in proper RFC3339 format, or just the year. If it is anything else it will return false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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