JSFiddle - React, Tailwind, and code Playground
by timrwood
HTML
<script src="https://rawgithub.com/timrwood/moment/2.0.0/moment.js"></script>
CSS
pre {
margin: 0;
padding: 0 20px;
}
JavaScript
function log(m){$('body').append('<pre>'+m+'</pre>')}
function test(s) {
log(' ');
log('expected: ' + s);
log('local: ' + moment(s).format());
log('utc: ' + moment.utc(s).format());
log('dst: ' + moment(s).isDST());
log('unixlocal: ' + moment(s).unix());
log('unixutc: ' + moment.utc(s).unix());
}
test('2013-03-31T00:10');
test('2013-03-31T01:10');
test('2013-03-31T02:10');