if my server is configured timezone ‘America / Caracas’, it is assumed that my application will use the hours in the area, because you have to convert utc and subtract -4.30, can explain and apologize for the inconvenience.
Example:
Config Server:
PHP: 5.4.37.
ICU: 50.1.2.
timezonedb:
-
Alternative Timezone Database: enable.
-
Timezone Database Version: 2015.1
Server Config:
‘America/Caracas’ in php.ini
Yii2 Aplication:
Yii::$app->formatter->locale = 'es-ES';
Yii::$app->timeZone = 'America/Caracas';
because when I want to use the short time format, then subtracted UTC. -4.30.
Example:
echo (Yii::$app->formatter->asTime('12:41:00', 'short'));
//show 08:11.
//should show: 12:41.
Thks,
Wilmer.