Gente, non riesco a ottenere il timestamp UTC utilizzando il momento. La speranza che qualcuno mi può puntare nella giusta direzionemomentoJS ottenere il timestamp UTC
var start = Date.now();
var utc = moment.utc(start).toDate();
o
var utc = moment.utc().toDate();
Tue Nov 11 2014 13:45:13 GMT-0500 (EST)
Restituisce il fuso orario EST mi trovo, non UTC. Come ottengo la data di Javascript in UTC?
Se faccio
var utc= moment.utc();
console.log(utc);
uscita è
{ _useUTC: true,
_isUTC: true,
_l: undefined,
_i: undefined,
_f: undefined,
_d: Tue Nov 11 2014 13:43:21 GMT-0500 (EST) }
Grazie
Qual è il valore di 'start'? – Daniel
'var start = Date.now();' – Cmag
ha aggiornato la domanda :) grazie – Cmag