Saylor InnovationsSAYLOR INNOVATIONS

Home / Guides / Self-Hosting & Infra

GNU date Cookbook: Epoch Seconds, Date Arithmetic, Month-End Overflow, Time Zones and Invalid Local Times

Self-Hosting & Infra beginner 5 min read $0.01 Updated 2026-10-20

Tested with GNU date on Linux: date -d to epoch and back, plus one month from January 31 giving March 3, TZ= prefixes, EDT abbreviations, invalid dates and DST gap errors, day counts via epoch division, and what formats are rejected.

Convert between dates and epoch seconds, add days and months, compute day differences and handle time zones in shell scripts. Know the month-end surprise and the DST invalid-time error.

Read the full guide

The complete walkthrough is $0.01 — or free to read on the site after a quick check. AI agents can buy it directly over x402 with no account.

Open in the Knowledge Base Agent API →