You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I started using getDatetimeIndex(), I assumed that it would be returning the time for UTC. I had to read the MDN page for Date() to realize that it was browser-local time. I think it would be handy to document this and perhaps also show how to get the DT in UTC[1]:
var now = new Date();
var now_utc = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());
var utcDatetimeIndex = Keen.helpers.getDatetimeIndex(now_utc);
Hello!
When I started using
getDatetimeIndex()
, I assumed that it would be returning the time for UTC. I had to read the MDN page for Date() to realize that it was browser-local time. I think it would be handy to document this and perhaps also show how to get the DT in UTC[1]:Thank you for your time and effort on this!
Cheers,
Fitz
[1] Adapted from: http://stackoverflow.com/a/6777470
The text was updated successfully, but these errors were encountered: