-
Notifications
You must be signed in to change notification settings - Fork 145
Converting Unix Time Stamp
bman46 edited this page Jul 17, 2017
·
12 revisions
In order to convert the unix timestamp from its unix time to your local time you need to add the following code where you would like to convert it:
<?php
echo date("Y-m-d\TH:i:s\Z", $steamprofile['lastlogoff']);
?>
<?php
echo date("Y-m-d\TH:i:s\Z", $steamprofile['timecreated']);
?>
date_default_timezone_set(/*timezone_identifier*/);
More info about the set timezone code listed above on this website: http://php.net/manual/en/function.date-default-timezone-set.php ######Tips and Tricks:
- Use
gmdate()
instead ofdate()
to get the GMT date/time - for more info on
date()
function check here