Display unix time in local time with php

Submitted by Fekete Zoltán on Sun, 04/18/2021 - 12:11

$unix_timestamp = 1616076808; // just an example valid unix time

setlocale(LC_TIME, 'hu_HU'); // use your locale instead of mine

echo strftime('%Y-%m-%d, %A, %H:%M', $unix_timestamp);

 

 

Tags