Wrong time in application.

General discussion on Zend Core for IBM System i
Post Reply
beadams
Posts: 3
Joined: Tue Mar 02, 2010 4:01 pm

Wrong time in application.

Post by beadams » Tue Mar 02, 2010 4:07 pm

Hello,

We installed a couple of open source PHP applications and all was well. We installed another and this application brings in the wrong time. The time it shows is 5 hours ahead. For example it will be 8:00 AM but the time will show as 1:00 PM. The QUTCOFFSET = -05:00 which is correct. QTIMZON is Eastern Standard Time or EST.

The other two PHP apps do display the correct time. I am very new Zend and PHP and have looked for an environment variable that may be set incorrectly but can't find one.

Any help will be greatly appreciated.

Regards,
Bobby

beadams
Posts: 3
Joined: Tue Mar 02, 2010 4:01 pm

Re: Wrong time in application.

Post by beadams » Thu Mar 04, 2010 2:11 pm

I found the problem. In the Zend Core configuration under Extensions in the date-Date module, I found the date.timezone variable. It was set to UTC and I changed it to US/Eastern. I do have a question, though. The description of date.timezone is "The default timezone used by all date/time functions if the TZ environment variable isn't set". Where is the "TZ environment" variable set?

Bobby

User avatar
rodflohr
Zend Global Support
Posts: 56
Joined: Mon Dec 29, 2008 5:28 pm

Re: Wrong time in application.

Post by rodflohr » Thu Mar 04, 2010 7:57 pm

The TZ environment variable is in PASE. You can learn more about it here:

http://publib.boulder.ibm.com/infocente ... 2shell.htm

However, you do not need it. The way you have things set up now is fine. Just for reference, here is a link to an article that describes what needs to be done:

http://kb.zend.com/index.php?View=entry&EntryID=320

beadams
Posts: 3
Joined: Tue Mar 02, 2010 4:01 pm

Re: Wrong time in application.

Post by beadams » Thu Mar 04, 2010 8:26 pm

Thanks for the two links, expecially the article in the knowledge base. I searched there but obviously didn't use the correct words to find it. It is so straightforward and succint it's great.

Post Reply