Limited Time Offer - from 2,55zł/month
00
DAYS
06
HOURS
54
MINUTES
37
SECONDS
Rozpocznij
×

Podstawy Nauki

Find articles about information features, troubleshooting guides,
and other technical information related to the hosting service Hostinger.

How can I modify the PHP timezone setting for my website?

Modified on:
timezone php php timezone

Your server's Global time configuration cannot be changed, but you can use the PHP function date_default_timezone_set to set the timezone for your website. Here's an example code that sets and checks the currently set timezone:

<?php
date_default_timezone_set("Asia/Bangkok");
echo date_default_timezone_get();
?>

A list of available PHP timezones can be found here: http://www.php.net/manual/en/timezones.php

  • Kreator Stron
  • 99.9% Gwarancja Uptime
  • 24/7 Live Wsparcie
  • Powerful Control Panel
  • 30-dniowa Gwarancja zwrotu pieniędzy
Limited Time Special Offer!
Tylko
2
55
/Mi
Zapisz 90%
Rozpocznij