News for hackers. Stuff that matters.
Re:We saved $50k/year with a Go microservice coded in a hack... by e12e on Wednesday April 11, 2018 @03:20PM (#16814550)
> will accept "0000-00-00 00:00:00"

Isn't it? I thought that today()-(2018 years, 4 months and 10 days) would be approximately that date? Maybe you prefer +0000 vs just 0000?

'ISO 8601 prescribes, as a minimum, a four-digit year [YYYY] to avoid the year 2000 problem. It therefore represents years from 0000 to 9999, year 0000 being equal to 1 BC and all others AD. However, years prior to 1583 are not automatically allowed by the standard. Instead "values in the range [0000] through [1582] shall only be used by mutual agreement of the partners in information interchange."

To represent years before 0000 or after 9999, the standard also permits the expansion of the year representation but only by prior agreement between the sender and the receiver.[19] An expanded year representation [±YYYYY] must have an agreed-upon number of extra year digits beyond the four-digit minimum, and it must be prefixed with a + or − sign[20] instead of the more common AD/BC (or CE/BCE) notation; by convention 1 BC is labelled +0000, 2 BC is labeled −0001, and so on.'

https://en.m.wikipedia.org/wiki/ISO_8601

Now, if mysql accept, but can't store such a date, I understand that it's a problem.

Re:We saved $50k/year with a Go microservice coded in a hack... by paulryanrogers on Wednesday April 11, 2018 @03:35PM (#16814692)
Technically true but still 0 is not yet a month or day of the month, so 0000-00-00 is still bad data
Re:We saved $50k/year with a Go microservice coded in a hack... by e12e on Thursday April 12, 2018 @01:37AM (#16818299)
Ah, yeah. Was too focused on the year to consider the month/day!
Re:We saved $50k/year with a Go microservice coded in a hack... by dijit on Wednesday April 11, 2018 @04:51PM (#16815484)
MSSQL/Oracle/PostgreSQL/firebird all accept 0000-01-01 which is a valid date.