Call the function Now from the onload event or change event. The current function will populate the current date and time on your date time field and will also take care of the daylight savings.
function Now(primaryControl, attributename) { debugger; var formcontext = primaryControl.getFormContext(); //formcontext is new // upgraded way of //calling Xrm.Page which now // got depricated in D365 //If you are still working on crm 16 or below you can directly use Xrm.Page if (formcontext.ui.getFormType() == 1) { var date = new Date(); if (date.dst()) { date.setHours(date.getHours() + 1); formcontext.getAttribute(attributename).setValue(date); return; } formcontext.getAttribute(attributename).setValue(date); } } Date.prototype.stdTimezoneOffset = function () { debugger; var jan = new Date(this.getFullYear(), 0, 1); var jul = new Date(this.getFullYear(), 6, 1); return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset()); } Date.prototype.dst = function () { debugger; return this.getTimezoneOffset() < this.stdTimezoneOffset(); }