I ran into an oddity in my program and was able to reproduce it in a simple test app here:
https://anvil.works/build#clone:I5GQL4DNMKMOUD2N=ZSOB6Q2ZXRJ2XCHQARWAYWEE
There’s a table with two time columns, ‘Time1’ and ‘Time2’. Upon clicking the “update” button, a server function runs:
now = datetime.datetime.utcnow()
ts_table = app_tables.time_stamps.search()
row = max(ts_table, key=lambda r: r[‘Time1’])
row[‘Time1’] = now
row[‘Time2’] = row[‘Time1’]
The result is that row[‘Time2’] is set to row[‘Time1’] rounded to the nearest second. (Verify by looking at the data table through the IDE.)