Closed lenworthrose closed 8 years ago
Thanks.
@apa512 I noticed you closed the PR - do you have plans to fix this in another manner? It's causing issues in our software, since we need to retain millisecond precision
@lenworthrose could you add some tests for this new behaviour? Reopening as it looks like a valuable change.
@lenworthrose I meant to merge but forgot to click the button. Sorry about that.
@danielcompton Done! Created a unit test that writes a DateTime to the DB, then retrieves that value from the DB and compares the two. When I reverted my initial commit, this test failed.
@apa512 No worries! Just wanted to make sure this didn't get lost :smiley:
Very good. I'll get this released right away.
Thanks @lenworthrose and @apa512 :)
clj-time's to-epoch function returns the number of seconds since epoch, which truncates the milliseconds of DateTime. Use to-long, which returns milliseconds since epoch, and divide by 1000 in order to properly format this number