Welcome Guest, Not a member yet? Register   Sign In
The problem with date helper??????????????
#1

[eluser]SaSa[/eluser]
hello
date helper, local time does not display.
my code:
Code:
$timestamp = time();
$timezone = 'UP25';
$local = gmt_to_local($timestamp, $timezone);
$human = unix_to_human($local);
$date ['date'] = $human;
$this->load->view('admin/customer_size_show', $date);
This code displays the time: 2011-05-17 07:55 PM
Now is the time: 2011-05-17 12:26 AM

What do I do? What's your solution?
#2

[eluser]web-johnny[/eluser]
[quote author="meti" date="1305680291"]hello
date helper, local time does not display.
my code:
Code:
$timestamp = time();
$timezone = 'UP25';
$local = gmt_to_local($timestamp, $timezone);
$human = unix_to_human($local);
$date ['date'] = $human;
$this->load->view('admin/customer_size_show', $date);
This code displays the time: 2011-05-17 07:55 PM
Now is the time: 2011-05-17 12:26 AM

What do I do? What's your solution?[/quote]

Try this:
Code:
echo date('Y-m-d h:i A');
no need to call helper.

Also if you want some functions for date that are helpful view this link http://www.web-and-development.com/php-date-functions/ . Its an old post of mine




Theme © iAndrew 2016 - Forum software by © MyBB