getTime is just to calculate time zone offset.
new Date( date.getTime() + new Date(date.getTime()).getTimezoneOffset()*60*1000 )
it is
Return value
The value returned by the getTime()
method is the number of milliseconds since 1 January 1970 00:00:00 UTC.