I’m trying to work out what format this date is in!
'date' => int 1342640973
Date today is 18.07.2012
I got it from the get_file_info function in the CI File Helper.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s a unix timestamp!
The value you have represent a date/time in seconds since the first of January 1970 (in UTC), it’s often referred to as a "unix timestamp" because of it’s origin.
Handling this time representation is easily done in PHP, there are native functions made to convert back and to the format.
time ()will return the current time in the format specified (unix timestamp), to convert this into a readable string you can usedatewith the appropriate format-string, as in the below example:output on my system:
Unless you have told PHP which timezone it’s currently in (using php.ini or equivalent) you’ll need to specify this using the function
date_default_timezone_set(), passing it the value ofdate_default_timezone_get()will try to set it according to your system preferences.If it’s unable to find a correct match UTC will be used per default.