I am working with angular project and need to send correct date and time to the server. First, I have taken the offset by using below code let offset=new Date().getTimezoneOffset(); let datestring="2024-12-21T00:00:00" let newdate=new Date(datestring); The 'newdate' display in the console like below Dec 21 2024 00:00:00 GMT-0500 (Eastern Standard Time) But the offset value is 240 that means four hours. As you can see offset value is not matching for the standard time offset value which is showing -0500. Can you please let me know why offset value taken from getTimezoneOffset() method is different from the offset value in the newdate object (-0500)?. There is an one hour difference. Thanks in advance Continue reading...