How to manage time zones in Carbon?

Hello! Arose, as I kadetsa, stupid, but still drove me to a dead end issue. How to work with time zones? Each use on the site may specify in the profile settings preferred time zone. Accordingly I need to display the time given is.
With the conclusion of the time no problems
\Carbon\Carbon::parse($createdAt)->timezone('Europe/Rome')->format('d M, Y H:i');

The question is, that code above correctly worked out how to store date in database? What time zone?
Thanks in advance!
March 19th 20 at 09:21
2 answers
March 19th 20 at 09:23
Solution
store in UTC.
timzone depending on the needs or stored in the user profile, or obtain from the client.
Thank you very much. - etha commented on March 19th 20 at 09:26
March 19th 20 at 09:25
Solution
Store in the utc offset time zone do only when you output the data.
Thank you very much. - etha commented on March 19th 20 at 09:28

Find more questions by tags PHP