date and a timestamp(tz) datatypes, coming and going from database to js code.dates or timestamp(tz)s as Date objects, not knowing from which kind of datatypes they originated to, and writing them as Date objects to the db works flawlessly due to truncation at the db level. So you get bugs in js and bugged data into your db.