How to set indonesia time zone in php?

by filiberto , in category: PHP General , a year ago

How to set indonesia time zone in php?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by edmond_brakus , a year ago

@filiberto 

You can set the time zone for Indonesia in PHP by using the date_default_timezone_set() function. Here is an example of how to set the time zone to Indonesia (Jakarta):

1
date_default_timezone_set('Asia/Jakarta');


You can add this line of code at the beginning of your PHP script to set the time zone for Indonesia. This will ensure that all date and time functions in your script will use the specified time zone.

Related Threads:

How much money does a PHP programmer make in Indonesia?
How to set run time env variable in webpack?
How to set duration time to two seconds in kineticjs?
How to get the current date and time in PHP?
How to convert a time to milliseconds using php?
How to add an odd day to a time in php?