Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Owed a billion dollars in Nvidia stock (colo.to)
    296comments
  2. Thinking fast and slow in AI: The role of metacognition (2021) (arxiv.org)
    32comments
  3. Ember-1 (fireworks.ai)
    216comments
  4. Prompting Claude Opus 5.5 (claude.com)
    84comments
  5. When did Google get so weird? (sancho.bearblog.dev)
    725comments
  6. Nissan's third generation e-POWER powertrain (nissan-global.com)
    80comments
  7. Footguns with Postgres "at time zone 'UTC'" (bookofrevenue.com)
    12comments
  8. Malleable software: Restoring user agency in a world of locked-down apps (2025) (inkandswitch.com)
    43comments
  9. Analysis: EVs are now nine times cheaper than petrol or diesel to drive in UK (carbonbrief.org)
    10comments
  10. Functional Mechanical Sympathy [video] (youtube.com)
    1comments
  11. Made by Mechanical Means (felixrieseberg.com)
    5comments
  12. Alan Kay's answer to “Did the ENIAC have a BIOS”? (quora.com)
    42comments
  13. Self-Hosting on the Dark Web (alvarezrosa.com)
    78comments
  14. Guitar amp and effects pedal built on the Waveshare ESP32-S3-Touch-AMOLED-2.06 (github.com/dashersw)
    39comments
  15. Lunar Terminator Paradox (secretsauce.net)
    51comments
  16. SpaceX's Starship launching to orbit for first time ever today (space.com)
    —discuss
  17. The state of SIMD in Rust in 2026 (shnatsel.github.io)
    38comments
  18. Don't couple your Go code to GitHub (iain.rocks)
    114comments
  19. In an $80 motel room, a discovery to shed light on the origins of life (nytimes.com)
    94comments
  20. Deterministic Concurrency [video] (youtube.com)
    3comments
  21. There is more to code review than (automatable) detection (adaptivecapacitylabs.com)
    87comments
  22. Imp is a full port of DSPy to the BEAM (github.com/deepfates)
    7comments
  23. What I did at Recurse Center (thill.me)
    32comments
  24. Show HN: Lofi Cities – Pixel-art city nights with browser-generated lofi (loficities.com)
    112comments
  25. Replacing the old battery on rechargeable bike lights (jvns.ca)
    93comments
  26. Reading’s Bayeux Tapestry (diamondgeezer.blogspot.com)
    18comments
  27. Previously unheard recordings of John Coltrane, captured by Frank Tiberi (jazzwise.com)
    33comments
  28. Writing Efficient C++ Code (2013) (asawicki.info)
    119comments
  29. Oral history of John Chowning, inventor of FM synthesis [video] (youtube.com)
    24comments
  30. Packing Binary Is Fun (hereticpleb.vercel.app)
    9comments

Footguns with Postgres "at time zone 'UTC'"

24 pointsby 1d agobookofrevenue.com
12 comments
1h agoHN ↗

? Footguns as a synonym for "caveat" or "gotcha" were in use long before LLMs. I hate Claude speak too but there's no need to knee-jerk blame everything on LLMs.

1h agoHN ↗

While that is true (the LLMs surely had to learn it from pre-existing content), I think it's been so thoroughly overused and turned into a cliche that the term has been ruined for the foreseeable future.

7m agoHN ↗

Looking forward to the blog post "Term footgun considered harmful"

1h agoHN ↗

I think most of the confusuion comes from "AT TIME ZONE" being the syntax for both the conversion from _and_ to timezone'd timestamps. Maybe it would have been more intuitive had the two operations gotten different wordings, e.g.:

timestamp to timestamptz: AS ZONED AT TIME ZONE ...

timestamptz to timestamp: AS LOCAL AT TIME ZONE ...

1h agoHN ↗

Postgres 'at time zone' is confusing, but it's internally consistent. Once you understand what it's doing, you can work with it and it will reliably behave the way it's designed to.

https://oneuptime.com/blog/post/2026-01-25-postgresql-timezo...

    -- TIMESTAMPTZ AT TIME ZONE 'X' -> returns TIMESTAMP in timezone X
    -- TIMESTAMP AT TIME ZONE 'X' -> returns TIMESTAMPTZ treating input as timezone X
56m agoHN ↗

The SQL standard is unfortunately really horrible when it comes to handling of time. The type `timestamp` is not a timestamp at all because it doesn't encode a unique point in time, it just stores a date and a time which has to be interpreted relative to a timezone. It should be called "datetime".

Moving a Java Instant back and forth between a database is also a surprisingly difficult task to do right, and it doesn't help that JDBC is just handling it completely wrong if you use its setTimestamp/getTimestamp methods. Not because it is a bad design with footguns, but because the implementation is just plain wrong and will corrupt your data if you deal with instants whose calendar date is far enough in the past due to it using the legacy date/time API which switches to the Gregorian calendar for dates in the past.

The name `timestamp with time zone` is also misleading because it doesn't actually store a time zone, it stores the number of seconds since epoch like a java.time.Instant (although at a different resolution). The "with time zone" part just refers to the textual format you denote the values in which includes the time zone after the date/time part to uniquely identify a timestamp, but the time zone is thrown away and not stored after the value has been parsed. This is different from e.g. `ZonedDateTime` in Java which will actually store the offset and therefore corresponds to a pair of (Instant, TimeZone).

30m agoHN ↗

A ZonedDateTime is not an instant and a timezone, for the same reason that you can’t unambiguously round trip between arbitrary timezones and UTC:

- zoned datetimes carry ambiguities as to their actual location on the timeline (because they can repeat, or not exist at all)

- future zoned datetime carry outright uncertainty as to their actual location on the timeline (as the zone’s offset can be updated at any point and any number of times until the event has elapsed)

16m agoHN ↗

SET TIME ZONE 'UTC'; // or GMT, PST, etc.

55m agoHN ↗

Makes me wonder what kind of footgun we are talking about here — is it classic, smoking, standard or vanilla?

25m agoHN ↗

Rookie pseudo-footgun - assumed skill exceeds capability error - usually accompanied with blameshifting pronunciation as demonstrated here. Anyone familiar with UTC/tz from another platform (e.g. excel) would be mostly immune or able to quickly identify and remedy.

22m agoHN ↗

Adding a month with + INTERVAL '1 months' is timezone-dependent. […]

Adding months isn’t well-defined anyway, even when using date, for days of month > 28. I think it’s a mistake that systems generically allow such a computation (as opposed to application code implementing domain-specific business rules).