7 ms·
64-bit unix timestamp is not supported in MySQL functions (2005)
- jolmg 7y agoApparently, it's also an issue with MariaDB.
- OrgNet 7y agoI don't know, but I also don't know why anyone didnt make the switch to MariaDB yet...
- PeterZaitsev 7y agoIgnorance is bliss ? Non of the top Internet dogs - Facebook, Twitter, Uber run MariaDB
- tyingq 7y agoThere's at least one that does. https://www.theregister.co.uk/2013/09/12/google_mariadb_mysql_migration/ https://www.theregister.co.uk/2013/09/12/google_mariadb_mysq... And Wikipedia: https://blog.wikimedia.org/2013/04/22/wikipedia-adopts-mariadb/ https://blog.wikimedia.org/2013/04/22/wikipedia-adopts-maria...
- PeterZaitsev 7y agoSome do. But MySQL is far much more popular on large scale environments. In Google BTW I'm not sure how much MySQL/MariaDB is left at all. They have been moving most of the stuff to Spanner.
- nimchimpsky 7y agopostgres
- devwastaken 7y agoPerformance most likely.
- Izkata 7y agoFear of breaking stuff. We still have some MySQL 5.1
- oarabbus_ 7y agoReason 34,583,498 to use Postgres instead of MySQL.
- q3k 7y agoAlso to not use the TIMESTMAP type in general, which is full of similar by-default footguns (off the top of my head: default 1-second precision, connection-local timezone autoconversion). At least for non-historic events. Use uint64 as nanoseconds from epoch. Explicitly convert to/from UTC in your application code. Smear your leap seconds. This will last you until 2554, by which time I hope computers as we know are dead. Bonus: these make for decent strong-read-ordered internal UUIDs, given good retry logic.
- deleted 7y ago[deleted]
- nwallin 7y agoReason #-2147483648 to use PostgreSQL instead of MySQL.
- PeterZaitsev 7y agoNote - MySQL Have 2 data types. One is TIMESTAMP which is signed 32bit timestamp which is very useful for times around now. There is also DATETIME type which has broad range and this is what you should use in general
- q3k 7y agoMySQL has more unfortunately-named time-related types than Python, which IMO is quite the achievement: - TIME - DATE - YEAR - TIMESTAMP - DATETIME
- lathiat 7y agodecades of history and following decades old standards from the start of computing in the 70s, 80s.. will do that to you.
- petre 7y agoThey should probably map to DATETIME internally but it inefficient for storage.
- jbverschoor 7y agoDecades of MySQL not following standards you mean?
- PaulHoule 7y agoWhat you need is the Allen Algebra over intervals so you can represent, say a "week", as an interval from a start and an end.
- PhasmaFelis 7y agoWhoever set up the database for my current work project apparently thought that wasn't enough, because it's got a whole lot of columns called "dateTimeStamp" which--on inspection--turn out to be VARCHARs containing a string representation of a timestamp. In ISO 8601 format. The one that looks like "2019-12-11T00:04:37.754329Z". Yes, they actually have six decimal digits of precision. For tracking boxes on a warehouse conveyor belt.
- bigtunacan 7y agoThis is going to be great for programmer job security in 2036/2037 if we just keep it hush hush for awhile longer.
- CaliforniaKarl 7y agoIs this the only part of MySQL/MariaDB that is known to have a Year-2038 issue?
- tyingq 7y agoYes. UNIX_TIMESTAMP(), FROM_UNIXTIME(), and the TIMESTAMP datatype. Everything else time related appears to be fine.
- horizone 7y agoGoing to be an interesting birthday for me that year. Still surprised that this hasn’t been fixed yet, we’ve known about it for a while.
- mackal 7y agoRan into this issue on a project I work on :P