Skip to content

Instantly share code, notes, and snippets.

@VoilaNeighbor
VoilaNeighbor / simple_time.zig
Created April 19, 2024 18:34
Simple time format implementation in pure Zig
const timezone_shift = -5; // -05:00
const TimeParts = packed struct {
year: u12,
month: u4, // 16
day: u5,
hour: u5,
minute: u6, // 32
second: u6,
millisecond: u10, // 48