I was doing some tinker
ing for another question here on SO. And have some weird behavior for Carbon's diffInHours. The diff of time ahead is not the same as the diff of time past. Here is my tinker commands and return values:
>>> \Carbon\Carbon::now()->diffInHours(\Carbon\Carbon::now()->addHours(3))
=> 3
>>> \Carbon\Carbon::now()->addHours(3)->diffInHours(\Carbon\Carbon::now())
=> 2
>>> \Carbon\Carbon::now()->addHours(3)->diffInHours(\Carbon\Carbon::now())
=> 2
>>> \Carbon\Carbon::now()->addHours(3)->diffInHours(\Carbon\Carbon::now())
=> 2
>>> \Carbon\Carbon::now()
=> Carbon\Carbon @1595427497 {#4431
date: 2020-07-22 14:18:17.952594 UTC (+00:00),
}
Does anyone have any insight as to what is causing this behavior?