nalgeon

Joined 10 years ago

Karma
6,898
Submissions
508
Member since
Dec 12
antonz.org
View on Hacker News

Recent submissions

Comment · 2 years ago
The title of the article is "Micro-libraries need to die already". Renaming the submission to "Micro-libraries should never be used" is pathetic, Daniel. I'm not surprised though.
Comment · 2 years ago
I appreciate your comments, and thank you for trying out the extension.

This query returns -1 (minus one, not one), which seems correct to me. The first date is before the second:

    select time_compare(
      time_date(1927, 12, 31, 23, 58, 08, 0, 28800000),
      time_date(1927, 12, 31, 23, 58, 09, 0, 28800000)
    );

    -1
Comment · 2 years ago
Thanks for the suggestion! True, only fixed offsets are supported, not timezone names.
Comment · 2 years ago
Storing unix timestamp as nanoseconds is not Go's style, but you can do just that with this extension.

    select time_to_nano(time_now());
    -- 1722979335431295000
Comment · 2 years ago
> If the result exceeds the maximum value that can be stored in a Duration, the maximum duration will be returned.
Comment · 2 years ago
It works very well for me and thousands of other Go developers. That's why I chose this approach.
Comment · 2 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton