How to prevent custom datetime field to be saved with rounded-off seconds value

Hi All,

I have an after_save logic hooks that copy the date of date_modified to a custom datetimecombo field. But when it is triggered, there are 2 rows being updated in the audit logs and there are values that the seconds are being rounded-off.

field_namebefore_value_stringafter_value_string
date_modified2017-01-27 22:20:172017-01-27 22:24:03
custom_date_c2017-01-27 22:20:172017-01-27 22:20:00
custom_date_c2017-01-27 22:20:002017-01-27 22:24:03

Anyone knows how to fix this or any tweaks? Tevfik Tümer, Alex Nassi, Dennis Wangerin

Thanks,

Roland