php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #31352 PHP_TZ environment variable
Submitted: 2004-12-30 13:23 UTC Modified: 2005-01-11 10:36 UTC
From: gordonisnz+phpnet at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gordonisnz+phpnet at gmail dot com
New email:
PHP Version: OS:

 

 [2004-12-30 13:23 UTC] gordonisnz+phpnet at gmail dot com
Description:
------------
http://www.php.net/manual/en/ref.datetime.php

In the TIME / DATE sections of your site, There are very few references to the

PHP_TZ - Timezone area of PHp - this can be very useful..

EG :-

Example shown :- http://nz2.php.net/localtime

notes :- 
test at test dot de
22-Aug-2001 05:05

(I didnt put that there)

- Ive been looking for Some time,  & the 
putenv( "PHP_TZ=Europe/Berlin" );

That command can be very useful to me - & does exactly what  I want / Need

- Ps -  Can it also be added to the side-menu too..

- ALSo - a list of known timezones that PHP recognises ??

Thanks...



Reproduce code:
---------------
<?php
   print "<HTML><body><pre>";
  
   setlocale( "LC_ALL", "de_DE" );
  
   putenv( "PHP_TZ=Europe/Berlin" );
  
   $now = time();
  
   print_r( localtime(time(),true) );
   print_r( getdate() );
  
   print date("H:i:s");
   print date("T");
  
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-11 10:34 UTC] vrana@php.net
PHP doesn't recognize PHP_TZ environment variable. There's TZ environment variable which values are system specific and same for all applications AFAIK.
 [2005-01-11 10:36 UTC] vrana@php.net
Marking as bogus.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Aug 06 18:00:03 2025 UTC