Welcome Guest, Not a member yet? Register   Sign In
After deployment: Error: Class "CodeIgniter\I18n\Time" not found
#2

(This post was last modified: 01-30-2025, 02:31 PM by captain-sensible.)

have you got in contoller anywhere:

Code:
use CodeIgniter\I18n\Time;


in base controller i have
Code:
protected $theTime;

public function __construct()
     {
        
        helper (['text','date','uri','html','form','secuity','numner']);
        $this->theTime =now('Europe/London');
        
    }
    
     protected function getTime()
     {
         return $this->theTime;
        
     }

then in any controller

Code:
public function __construct()
                    {
                        parent::__construct();
                        $this->myTime = parent::getTime();
                        $this->myDate= date("d/m/Y",$this->myTime);     
                    }

i dont know what i was thinking at the time , all i had to do was stick time() in a view
CMS CI4 A CMS system, runs out of the box written on top of CI4
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Reply


Messages In This Thread
RE: After deployment: Error: Class "CodeIgniter\I18n\Time" not found - by captain-sensible - 01-30-2025, 02:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB