Handling MySQLs wrong date(time) behaviour