CodeIgniter Forums

Full Version: Global Converting unix_to_human and human_to_unix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hi All !
How I can from unix time to convert in human time "1277063669" to 2010-06-20 ...
Now it's shows 2010-06-20 12:54:29 PM
I wanna see only in /user/edit page only 2010-06-20 in other pages like as /forums/topics/ 2010-06-20 12:54.....

That is my view page :
// Create 21.06.2010
// print_r($info); stdClass Object ([mail] => [email protected] [avatar] => [signature] => [rd] => 0 [active] => 0 )
$input_edit = array(
            'mail'=> array(
echo form_open("user/edit/go");
echo "Е-поща:".form_input($input_edit['mail']);
echo br();
echo "Подпис".br().form_textarea($info->signature).br();
echo unix_to_human($info->regtime);
echo form_close();

and part of my user page
function edit()
        if($this->session->userdata('login_in') !== 'yez')
        $info = $this->db->get_where('users',array('username' => $this->session->userdata('username')));
        $info = $info->result();
        $data = array('info'=>$info[0]);

El Forum

human to unix timestamp:
unix timestamp to human:

El Forum

[quote author="noctrum" date="1277160234"]human to unix timestamp:
unix timestamp to human:[/quote]

I think there is a already function.

Ok , 10x ;p

Sorry for my bad english.