RE: [PHP] Problem with getting time in EST
Tedd: you can set your default php timezone in the php.ini with the date.timezone value. What Server do you use? What OS? I'm using apache2.x on win32, debian and fedora core. The time of Detroit looks ok to compared to times stated on world time pages on the internet. After upgrading to PHP5, did you check for the latest version of PECL's timezonedb. I don't know if its included with the PHP package! May be a bad question, but are the time and timezone settings of your HW clock correct?? Just as the very last option to check, if everything else fails ... ;-) Jan -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Saturday, August 04, 2007 5:02 PM To: Jan Reiter; 'Crab Hunt'; php-general@lists.php.net Subject: RE: [PHP] Problem with getting time in EST Jan: That's the problem, it doesn't work. I have mine set for Detroit and it's an hour off Detroit time. It kind of bugged me that when I upgraded to php5 that I had to define the default time zone in my code, but then to find out that it's off by an hour really ticks me off. What's the point of defining a time zone if php5 isn't going to get it right? All this time I thought that I was doing something wrong, but it appears that this is a problem for others as well -- are we doing something wrong? Cheers, tedd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem with getting time in EST
At 3:57 PM +0200 8/4/07, Jan Reiter wrote: Hi! Try setting the timezone to one of the cities inside it from this list: http://www.php.net/manual/en/timezones.america.php DST will be taken into account automatically. Hope that helps. Jan Jan: That's the problem, it doesn't work. I have mine set for Detroit and it's an hour off Detroit time. It kind of bugged me that when I upgraded to php5 that I had to define the default time zone in my code, but then to find out that it's off by an hour really ticks me off. What's the point of defining a time zone if php5 isn't going to get it right? All this time I thought that I was doing something wrong, but it appears that this is a problem for others as well -- are we doing something wrong? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with getting time in EST
if time() is always 1 hour behind what you want, why not time() + 3600 // 60 seconds * 60 minutes On 8/4/07, Crab Hunt <[EMAIL PROTECTED]> wrote: > Hi, > I need to get the current time in EST timezone while my current timezone is > CEST. I use the function : > > date_default_timezone_set('EST') > > > But now the time that I get is 1 hour less than the time in EST ( > http://wwp.greenwichmeantime.com/time-zone/usa/eastern-time/), probably > without taking care of the daylight savings time (DST)... Can anyone help me > out how to solve it, its an urgent issue for me. > > Thanks a lot in advance, > regards, > Rakesh > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem with getting time in EST
Hi! Try setting the timezone to one of the cities inside it from this list: http://www.php.net/manual/en/timezones.america.php DST will be taken into account automatically. Hope that helps. Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with getting time in EST
HI, Are you looking for EDT or EST? EST = EDT -1. EDT = EST +1 Take care, Leonard On 8/4/07, Crab Hunt <[EMAIL PROTECTED]> wrote: > Hi, > I need to get the current time in EST timezone while my current timezone is > CEST. I use the function : > > date_default_timezone_set('EST') > > > But now the time that I get is 1 hour less than the time in EST ( > http://wwp.greenwichmeantime.com/time-zone/usa/eastern-time/), probably > without taking care of the daylight savings time (DST)... Can anyone help me > out how to solve it, its an urgent issue for me. > > Thanks a lot in advance, > regards, > Rakesh > -- Leonard Burton, N9URK http://www.jiffyslides.com [EMAIL PROTECTED] [EMAIL PROTECTED] "The prolonged evacuation would have dramatically affected the survivability of the occupants." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php