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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 03:01:31 2024 UTC