[javascript] Converting a datetime string to timestamp in Javascript