I have the following code that stores the current timestamp in localStorage
localStorage.setItem('visitedOn', new Date().getTime())
which sets the timestamp to 1586525864525 (today a few minutes ago)
When I make an API request to my Laravel backend, and parse the timestamp using
Carbon::createFromTimestamp($request->visitedOn)
It returns the following value, which is completely off.
Carbon @1104613325 {#993
date: 2005-01-01 22:02:05.0 Europe/Brussels (+01:00)
}
Any idea what might be going wrong? Are there multiple types of timestamps with different character lengths?