Open montes2012 opened 9 years ago
I did something similar to translate all input dates to UTC time (so it would add the timezone offset)
options:
var datetime = {
dateFormat: 'yy/mm/dd',
timeFormat: 'HH:mm:ss',
timezone: -420, //utc
//translates 'now' time to utc
onSelect: function(text, datepicker){
var now = new Date(text);
//convert user's selected time to UTC time
now = new Date(now.getTime() + now.getTimezoneOffset()*60*1000); //minutes*60seconds*1000milliseconds
if(datepicker.input)
datepicker.input.datetimepicker('setDate', now);
}
};
Is possible to add five hours to a date and time but get formatted