FIND YOUR NEXT FEW LINES

Results for “Dates & time zones”

Small, practical examples. Search by task or narrow things down below.

293 snippets foundClear filters
C#Dates & precise numbers

Convert Unix seconds to an offset-aware timestamp

C#: DateTimeOffset preserves the UTC offset explicitly.

C#✓ Tested
Linux CommandsDates & process utilities

Format a known UTC timestamp

Linux Commands: Use GNU date -u and an explicit input offset to avoid local timezone dependence.

Linux Commands✓ Tested
GoDates & times

Format a UTC timestamp

Format a UTC timestamp using a complete Go program with explicit sample inputs.

Go✓ Tested
C#Dates & precise numbers

Parse a date without a time component

C#: DateOnly avoids attaching an irrelevant time or timezone to a calendar date.

C#✓ Tested
JavaScriptUTC date operations

Sort timestamp strings by their parsed instants

JavaScript: Compare epoch values explicitly when date strings may contain different offsets.

JavaScript✓ Tested
TypeScriptUTC date operations

Sort timestamp strings by their parsed instants

TypeScript: Compare epoch values explicitly when date strings may contain different offsets.

TypeScript✓ Tested
GoDates & times

Advance a calendar date

Advance a calendar date using a complete Go program with explicit sample inputs.

Go✓ Tested
GoDates & times

Convert Unix seconds to UTC

Convert Unix seconds to UTC using a complete Go program with explicit sample inputs.

Go✓ Tested
GoDates & times

Display an instant at a fixed offset

Display an instant at a fixed offset using a complete Go program with explicit sample inputs.

Go✓ Tested
GoDates & times

Find the weekday for a date

Find the weekday for a date using a complete Go program with explicit sample inputs.

Go✓ Tested
GoDates & times

Measure a duration between instants

Measure a duration between instants using a complete Go program with explicit sample inputs.

Go✓ Tested
GoDates & times

Parse a date with a Go layout

Parse a date with a Go layout using a complete Go program with explicit sample inputs.

Go✓ Tested