1๐
โ
A JavaScript timestamp (see Date.now()
) is in milliseconds, not seconds like a Unix timestamp.
To make moment.js recognise your timestamp you probably need to multiply it by a thousand (since Chart.js is passing your value to moment.js):
1535577869 * 1000
If you were creating a moment directly you could specify an input format:
moment(1535577869, 'X');
Source:stackexchange.com