Whenever I use a date picker, and force the code to always default to be 23:59:59 it rolls over to the next day at 00:59:59.
Can you provide more information as to what exactly you are trying to do.
Maybe post a screenshot of your code?
Will be helpful for us to answer.
I have a date picker tool that need to set to the very end of the business day 23:59:59, but when I force that time as a default, it rolls it over to the next day at 00:59:59.
I found the issue:
Setting the following value:
cur_frm.set_value(“ship_date_time”, frappe.datetime.get_today() + " 23:59:59")
On one computer that has the same time zone setting in Windows as the ERPNext configuration (for example -5 UTC), the setting works fine, on another computer that has a different time zone (for example -3 UTC) in Windows the, the clock rolls over to the next day at 00:59:59.
Any reason for this?
Use moment()
to get the correct time according to the timezone.
For e.g:
var today = moment();
m.set({ hour: 23, minute: 59, second: 59 });