Fix ruby timestamp to javascript conversion