// This gives you the current datetime, without seconds or milliseconds. moment().seconds(0).milliseconds(0).toISOString();