I just started using the Carbon extension (seems pretty sweet so far), but am confused on the Carbon::now()
function. According to the docs, it seems as though this function should reflect the current time in the users current timezone, however, I seem to get a time that is an hour ahead of GMT.
i.e. Carbon::now()
says 2015-01-01 17:26:46
when I am on PST and it is actually currently 2015-01-01 08:26:46
.
Do I have to detect and put in a users local timezone for all instances?
What gives? (I very well may have a fundamental misunderstanding of how a website gets a users local time)
now()
actually should reflect the server timezone. It doesn't know anything about the end-user's timezone. – rmobistimezone
option onconfig/app.php
? – rmobistime();
give you? – AStopher