Encode BSON datetime milliseconds from epoch seconds provided by pure Lua.