In brief
The unit is important in exchanging with systems that use seconds.
Useful to know
getTime() returns the number of milliseconds since the beginning of 1 January 1970 UTC for the relevant moment. The difference between two such results is an interval in milliseconds . [1]
For two moments of 1500 ms distance the difference is 1.5 seconds after division of 1000. This is a conditional example of units. Do not pass Unix timestamp in seconds as milliseconds without conversion. At intervals set with local calendar days, the time shift must also be taken into account; calendar day and exact 24 hours are not always the same.
Sources
For further detail and to check the information: