Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #14288

Re: timezone

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.php
Subject Re: timezone
Date 2014-10-09 21:58 +0200
Organization PointedEars Software (PES)
Message-ID <28265110.HNhbBER5CJ@PointedEars.de> (permalink)
References <m16n9n$kpd$1@speranza.aioe.org>

Show all headers | View raw


bill wrote:

> I just updated to Ubuntu 14.04 LTS (php5.5)

According to Wikipedia [1], 14.04 LTS is six months old (2014-04-17) 
already; the latest PHP 5.5 release was in September.  Be sure to update 
PHP: <http://php.net/ChangeLog-5.php#5.5.17>

[1] <https://en.wikipedia.org/wiki/Ubuntu_(operating_system)#Releases>

> and in addition to the usual stuff I now am getting errors when I use date
> functions. Warning: date(): Invalid date.timezone value 'America.Detroit',
> we selected the timezone 'UTC' for now. in
> /var/www/html/MP2010-v2/general/clock.php on line 6
> 
> I did a find and found:
> william@ubuntu:/etc/php5/apache2$ sudo find / -name php.ini -print

“-print” is the default action for find(1), you can safely omit it (RTFM).

You can speed up the search next time by

a) looking only in and below /etc, where most if not all configuration files
   are found on Unices:
  
     sudo find /etc/ …

b) looking at the output of phpinfo() instead.

The latter will also tell you more exactly which configuration file you 
*actually* have to edit.

> /etc/php5/apache2/php.ini
> /etc/php5/cli/php.ini
> 
> I changed them both to
> ; Defines the default timezone used by the date functions
> date.timezone =America/Detroit

I would expect

  date.timezone = America/Detroit

but I suppose whitespace does not matter.  Be sure that

  sudo dpkg-reconfigure tzdata

or whatever you use on Ubuntu instead, allows you to select 
“America/Detroit”.
 
> as per http://php.net/manual/en/timezones.america.php
> 
> suggestions?

1. Post what happened when you used date() *afterwards*.

2. Have you executed

     sudo service apache2 reload

   or

     sudo service apache2 restart

   afterwards?  If not, PHP server module configuration changes do not take
   effect, as is evident by the corresponding phpinfo() output.

-- 
PointedEars
Zend Certified PHP Engineer
Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

timezone bill <william@TechServSys.com> - 2014-10-09 15:22 -0400
  Re: timezone Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-09 21:58 +0200
    Re: timezone Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-09 16:23 -0400
      Re: timezone Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-09 22:47 +0200
        Re: timezone Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-09 20:54 -0400
          Re: timezone Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-10 16:08 +0200
            Re: timezone Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2014-10-10 14:19 +0000
              Re: timezone Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-10 10:47 -0400
              Re: timezone Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-10 16:58 +0200
                Re: timezone Tim Streater <timstreater@greenbee.net> - 2014-10-10 21:59 +0100
                Re: timezone Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-11 13:40 +0200
                Re: timezone Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2014-10-11 09:02 +0000
                Re: timezone Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-11 13:37 +0200
                Re: timezone Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-11 10:25 -0400
            Re: timezone bill <william@TechServSys.com> - 2014-10-10 13:49 -0400
    Re: timezone bill <william@TechServSys.com> - 2014-10-10 07:45 -0400
    Re: timezone bill <william@TechServSys.com> - 2014-10-10 07:56 -0400
      Re: timezone Matthew Carter <m@ahungry.com> - 2014-10-10 09:55 -0400
        Re: timezone Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-10 10:52 -0400
      Re: timezone Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-10 16:17 +0200
  Re: timezone Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-09 16:20 -0400
    Re: timezone Matthew Carter <m@ahungry.com> - 2014-10-09 17:16 -0400
      Re: timezone Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-09 23:38 +0200
      Re: timezone Jerry Stuckle <jstucklex@attglobal.net> - 2014-10-09 20:56 -0400
  Re: timezone Tim Streater <timstreater@greenbee.net> - 2014-10-09 21:52 +0100

csiph-web