I want to view date and time and i am using date carbon getdate function but i am getting local machine date and time. Suppose my local machine date is 2020-03-19 then i am getting this as output from above three functions so how can i get current time and date instead of local machine date and time.` From both three linesstrong text i am getting my local machine date and time.
date_default_timezone_set('Asia/Kolkata');
echo date('Y-m-d');
print_r(Carbon::now());
echo '<br/>';
print_r(getdate());
So how can i get current date-time according to timezone instead of local machine date time?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire