News for hackers. Stuff that matters.

rainbowliquor

Actually I have an unpopular opinion in regards to your question on competency. The computing industry as a whole over the years has grown and morphed to the point that there’s a high level of ineptitude when it comes to basic administration of networks, servers, and services. Basic concepts of not sharing passwords, locking networks down, using TLS, least privileged access, and so much more aren’t practiced as much as they may have been (well if at all). I’m sure there are plenty of companies and teams that do good things but I’ve seen now at a few companies I’ve worked, lax attitude and poor response to incidents that I believe has made it scary easy for a bad actor to gain access to things they shouldn’t.
Re:Working with time in Postgres on Thursday June 08, 2017 @07:00PM (#14517846)
True but in the use case of OPs example. In the article OP says "So if we wanted to find the count of users that signed up per week:" which "2017-06-05 00:00:00+00" isn't a week, it's a date (with a time stamp as well which isn't pertinent) which happens to be the beginning of a week. Using TO_CHAR() with a format string makes it more legible and more recognizable.
Re:Working with time in Postgres on Thursday June 08, 2017 @06:50PM (#14517777)
date_trunc() is one way but to_char is even better as you can get the resulting output to something nicer. Doing:

  SELECT DATE_TRUNC('week', CURRENT_TIMESTAMP);
gives:

  2017-06-05 00:00:00+00
vs:

  SELECT TO_CHAR(CURRENT_TIMESTAMP, 'YYYY-WW"wk"');
gives:

  2017-23wk