Email shows date in the past?

#11
[eluser]mddd[/eluser]
The date is created when the Email class initializes, using the _set_date method in that class.
There, the date is constructed by CI. I don't know why date('r') is not used there. You could try changing that method from
Code:
function _set_date()
    {
        $timezone = date("Z");
        $operator = (strncmp($timezone, '-', 1) == 0) ? '-' : '+';
        $timezone = abs($timezone);
        $timezone = floor($timezone/3600) * 100 + ($timezone % 3600 ) / 60;

        return sprintf("%s %sd", date("D, j M Y H:i:s"), $operator, $timezone);
    }
to
Code:
function _set_date()
{
   return date('r');
}

#12
[eluser]InsiteFX[/eluser]
This is from PyroCMS index.php you can try this to see if it works

Code:
// Place in index.php!

if (ini_get('date.timezone') == '')
{
    date_default_timezone_set('GMT');
}

InsiteFX

#13
[eluser]vanquish[/eluser]
[quote author="InsiteFX" date="1282786134"]This is from PyroCMS index.php you can try this to see if it works

Code:
// Place in index.php!

if (ini_get('date.timezone') == '')
{
    date_default_timezone_set('GMT');
}

InsiteFX[/quote]

That did it!! Thanks so much!! Hopefully this is able to also help other people having the same problems.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.