Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse converts a time string to a unix timestamp (seconds). Supported formats:
- Go duration (relative to now): "5m", "1h", "24h", "168h" Interpreted as "now minus duration"
- Future duration with "+" prefix: "+24h", "+7d" Interpreted as "now plus duration"
- Day shorthand: "7d", "30d" — converted to hours automatically
- Date: "2026-04-01" (parsed as local midnight)
- Datetime: "2026-04-01 10:00:00" or "2026-04-01T10:00:00" (parsed as local time)
- RFC3339 with timezone: "2026-04-01T10:00:00+08:00" / "...Z" (the format the SDK emits)
- Unix timestamp: "1712000000" (passed through)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.