Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
The time Package in Go: time.Time, Duration, Formatting with the Reference Time ("2006-01-02"), Time Zones and the Monotonic Clock
In Go a date format is not given with codes such as yyyy-MM-dd but by showing how the reference time 2006-01-02 15:04:05 is written; "yyyy-MM-dd" does not fail, it is printed as it is. Duration, json/v2 giving Duration no default format, time zones and the three-hour shift from post 11, time/tzdata on scratch images and Windows, a delivery estimate on the warehouse clock, the monotonic clock and Equal, and the time.After trap.
Dates, Times and Intervals in PostgreSQL: now() vs clock_timestamp(), date_trunc, extract, AT TIME ZONE, age, date_bin and generate_series
In PostgreSQL, now() returns the moment the transaction started and does not change during the transaction; clock_timestamp() gives the real clock. Both directions of AT TIME ZONE, reports by Istanbul day, month and daylight saving rules, age and justify_interval, extract, time buckets with date_trunc and date_bin, filling empty days with generate_series, and why a WHERE with date_trunc cannot use an index, with SQL Server equivalents.