mardi 20 avril 2021

Get Current date time instead of local m/c date time

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?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3elaN3R
via IFTTT

Aucun commentaire:

Enregistrer un commentaire