I'm building an API, and encounterad a really wierd issue regarding timestamps, on a user object i have the standard created_at and updated_at fields, the timezone is set to UTC, but the value inserted is UTC+2 (my local time), so i started investigated, and if i echo out Carbon::now() i get the correct UTC-time, and i have a custom datetime-field called lastActvity where i put in Carbon::now(), and the time there is correct UTC. Doesn't Lumen use Carbon for their timestamps? Or what could the issue be? I've set the APP_TIMEZONE to UTC in env. If i echo ot the php timezone it's also set to UTC.
For example if i crate a new user at 16:05 CET (my local time)
The users timestamps will be:
created_at = 2015-06-25 16:05:29
If i then create a new match where i have a lastActivity-datetime field at the same time:
lastActivity=2015-06-25 14:05:29 - which is correct. Set by Carbon::now()