I have two applications using the same postgres DB. A laravel application and a rails application. The current data in the DB is in Y-m-d H:i:s format but whenever
Y-m-d H:i:s
In Laravel/PHP, you can convert DateTime with millisecond to without millisecond using below function:
$date = date('Y-m-d H:i:s.u'); echo date('Y-m-d H:i:s', strtotime($date));
In Rails, you can update your time object before sending it to the database, as mentioned below:
time.change(:usec => 0)