this one got me stuck for a little while ![]()
my dev box timezone is AEST.
if you change the timezone_reference in config to GMT CI sessions will now longer work.
function sess_run()
{
...
if (strtolower($this->object->config->item('time_reference')) == 'gmt')
{
$now = time();
$this->now = mktime(gmdate("H", $now), gmdate("i", $now), gmdate("s", $now), gmdate("m", $now), gmdate("d", $now), gmdate("Y", $now));
if (strlen($this->now) < 10)
{
$this->now = time();
log_message('error', 'The session class could not set a proper GMT timestamp so the local time() value was used.');
}
}
else
{
$this->now = time();
}
...
function sess_write()
{
...
setcookie(
$this->sess_cookie,
$cookie_data,
$this->sess_length + $this->now,
$this->object->config->item('cookie_path'),
$this->object->config->item('cookie_domain'),
0
);
so with timezone set to GMT the $this->now uses GMT time which always keeps the cookie expired.
maybe $this->now should always use time() ?
