I have a simple question for you. I have a unix timestamp variable in php, let me call it $unix, which contains the current unix timestamp (seconds passed after 1/1/1970 00:00:00 UTC), that by definition is UTC time. I want to convert it to a date string in CET time, like "29/03/19 14:50". It is crucial to have the CET format for me, not changing when the daylight saving time (DST) begins. In other words, the date I want is UTC+1 out DST, and during DST, and this has to be done automatically. I was thinking about using this function:
date_create_from_format ( string $format , string $time [, DateTimeZone $timezone ] )
so I should write something like:
date_create_from_format ('d/m/y h:i' , $unix, 'CET');
Am I wrong? What does not convince me is that in this page it is clarely written that:
The timezone parameter and the current timezone are ignored when the time parameter either contains a UNIX timestamp (e.g. 946684800) or specifies a timezone (e.g. 2010-01-28T15:00:00+02:00).
Is there a way to do what I want? Thank you!