How to Set IST in PHP

To set IST (Indian Standard Time) in PHP, you can use the date_default_timezone_set() function. Here’s an example: This sets the default timezone to Asia/Kolkata, which is the timezone for India. You can also use the DateTimeZone class to create a DateTimeZone object with the timezone you want, and then pass it to the DateTime constructor …