Hướng dẫn dùng gmt-10 trong PHP
simple question, but cannot seem to find an answer I need to set a timezone to UTC-8 and only UTC-8 (GMT-8 is actually the same). It cannot be a timezone with daylight time saving. Now PHP does not seem to provide a way to set to GMT-8, when using Now I could use GMT+8 to achieve GMT-8 (sounds odd but i Quote:
as there is no country in exactly UTC-8, i cannot put a country there... so I use Etc/GMT+8 and cross the fingers they wont change it? asked Mar 10, 2017 at 18:23 1 Yes, you can absolutely use That said, I'd ask you to question why you need a UTC-8 fixed offset time zone:
answered Mar 12, 2017 at 6:12 Matt Johnson-PintMatt Johnson-Pint 218k73 gold badges428 silver badges544 bronze badges 1 Not the answer you're looking for? Browse other questions tagged php date datetime timezone or ask your own question.Để giải quyết vấn đề này có nhiều cách, tuy nhiên trong chuyên đề này mình đi về time trong php nên mình sẽ dùng luôn hàm set lại muối giờ:. Nếu bạn muốn thay đổi cấu hình múi giờ cho PHP script, bạn có thể chèn đoạn mã sau vào phần mã PHP của bạn: \\ echo “Original Time: “. date(“h:i:s”).”\n”; Danh sách các mã múi giờ để sử dụng thay cho giá trị “US/Eastern” trong hàm putenv() có thể tìm thấy ở đây. return array ( |