timestamp

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Now

func Now() time.Time

Now returns a time.Time that closely approximates Microsoft's server time, suitable for inclusion in a signed Xbox Live request.

If Update has been called with a valid 'Date' response header, the cached delta is applied to the current local time to compensate for clock skew. Signed requests are rejected if the timestamp in the signature differs too much from the server time.

func Update

func Update(header http.Header)

Update computes the delta between the local clock and Microsoft's server time using the 'Date' header of an HTTP response, and caches it for later use by Now. If the header is absent or cannot be parsed, the cached delta is left unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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