util

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTimeParam

func ParseTimeParam(timeStr string) (time.Time, error)

ParseTimeParam parses time parameters supporting multiple formats: - "now" for current time - Unix timestamps (e.g., "1704067200") - Relative time (e.g., "1h", "30m", "7d") - ISO date strings (e.g., "2024-01-01T00:00:00Z")

func ParseTimeToUnix

func ParseTimeToUnix(timeStr string) (int64, error)

ParseTimeToUnix parses time string and returns Unix timestamp in seconds

func ParseTimeToUnixMilli

func ParseTimeToUnixMilli(timeStr string) (int64, error)

ParseTimeToUnixMilli parses time string and returns Unix timestamp in milliseconds

Types

This section is empty.

Jump to

Keyboard shortcuts

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