i developed the function to get current date and time value.it works fine.but time value is wrong.now time is 12.32 pm in my time but it save in the database as 6.40am.
Here is the controller function um using.
public function store(Request $request)
{
$request['time']=date("Y-m-d h:i:s a", time());
attendance::create($request->all());
return view('traineeattendance.attendanceo');
}
Sri Lanka Standard Time (SLST) is the time zone for Sri Lanka. It is 5 hours and 30 minutes ahead of GMT/UTC (UTC+05:30) so that Time Zone = GMT+5.5.
can anyone help me to figure out this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire