trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

calculate UTC #929

Open Yamakasi opened 6 years ago

Yamakasi commented 6 years ago

Is it possible to calculate the UTC time from a client as well ? As you can get the current time I would believe that getting the UTC also would be possible as well and put in some some (hidden) formfield.

prasadbcs commented 6 years ago

see https://stackoverflow.com/questions/13479416/how-to-set-now-button-on-jquery-ui-datetimepicker-to-set-utc-time

/*

var now = new Date(); var utcNow = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds()); this._setTime(inst, utcNow);