Milliseconds in haskell

At the day job we had this "funny" situation where some timestamps are in milliseconds (coming from javascript clients) and some in seconds. Time is notoriously difficult to deal with. In haskell, my goto library is datetime which wraps nicely a lot of other primitives.

Dealing with timestamps in seconds is easy: toSeconds and fromSeconds makes short work.

Dealing with timestamps in milliseconds however... The following snippets requires the packages datetime and time.

I've created an issue on the datetime repository to add these functions, but it seems dead at the moment :/ Hopefully this will make it at some point.