Hi, I am trying to create a unix timestamp to represent the last time of the current day (23:59:59) as follows:
current_date = new Date(); end = new Date(current_date.getFullYear(), current_date.getMonth(), current_date.getDate(),23,59,59); end = end.getTime() / 1000;
When I warn the unix timestamp and convert it back to datetime, although it is an hour behind and represents 22:59:59, not 23:59:59.
I need to pass 24 to the date function for the hour parameter instead of 23, if I want 11 pm, is that right?
I am in England, so my time should be in GMT
source share