Bootstrap DateTime Picker Timezone Fix
DateTime Picker: https://github.com/smalot/bootstrap-datetimepicker Fix for UTC default timezone when the e.date object is generated.
by Bacco
HTML
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="https://rawgithub.com/smalot/bootstrap-datetimepicker/master/js/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="https://rawgithub.com/smalot/bootstrap-datetimepicker/master/css/bootstrap-datetimepicker.css">
<form class="row">
<div class="col-xs-6">
<input id="time" type="text" class="form-control"
placeholder="Escolha a data e a hora" readonly></input>
</div>
<div class="col-xs-6">
<input id="out" class="form-control"
placeholder="Milissegundos" readonly></input>
</div>
</form>
JavaScript
$('#time').datetimepicker().on('changeDate', function (e) {
$('#out').val( e.date.getTime() );
});