How to Get Server Local Time Laravel 5.3

Posted 2 years ago by sandygajera

Hi,

I Install Laravel 5.3 , After i set timezone in config/app.php file value UTC i set, When i call date() function for get current datetime it return UTC time zone DateTime ,For UTC time No Problem , But how to get my server local datetime because my server datetime use timezone ASIA/KOLKATA so how i get Local Server Current Datetime without set any timezone in Code like This date_default_timezone_set("Asia/Bangkok"); Becuz If in Future Server is In Australia (Timezone: Australia/West) Then without any change from coding it return Australia Local Server TIme and Utc Also.

Please anyone found above query solution then please replay.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.