How To Add Seconds To Current Date Time In Codeigniter?

Codeigniter

Nicesnippets

933

22-12-2020


Hi Guys,

In this example,I will learn you add seconds to current date in codeigniter.you can easy and simply add seconds to current date in codeigniter.

we will show add seconds in current date codeigniter.this tutorial will give you example of add seconds to current date using codeigniter.

Example:


public function index()

{

// Add current time 15 seconds

$date = date('Y-m-d H:i:s', (time() + 15));

}

Output:

2020-12-22 10:26:34

It will help you...