As a newcomer to AngularJS, I am working on capturing a DateTime attribute in the UI and passing it to an Odata endpoint. However, the time being sent is not in the current local time. How can I convert this time to local time before sending it to the Odata?
<div>
<label style="font-size: medium">Collection Time</label>
<div name="collectionTime" uib-timepicker ng-model="sample.collectionTime"
hour-step="hstep" minute-step="mstep" show-meridian="ismeridian" required>
</div>
</div>
The Controller
var data = {
"JAX_SAMPLELOT_TIMECOLLECTED": sample.collectionTime
}