Re: Time Zone ?

2006-07-20 Thread seefai

Hi Brother

Thanks for reply.

But can you show me how to do it. i can't figure out..

Thanks

Andy


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Time Zone ?

2006-07-20 Thread seefai

Hi brother

Thank you guys, i have found a solutions.

i chage the date.timezone = Asia/Kuala_Lumpur in the php.ini

For those dont know the php.ini path, you can use phpinfo(); to have it

Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Time Zone ?

2006-07-20 Thread ryanb006

If you don't have access to php.ini, use the following code somewhere
in your application:

?php

ini_set('date.timezone','Asia/Kuala_Lumpur');

?

Same goes for my other post with the putenv function.

For a list of supported timezones, visit [1].

--
[1] http://us2.php.net/manual/en/timezones.php
--

Ryan


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Time Zone ?

2006-07-18 Thread John Zimmerman [gmail]
Do you know if your server's time is UTC?One way you can do it is log all times as UTC and then only convert them to local time upon display based on either a user's timezone or a timzone variable set in your cake app.
I have some basics going for timezones like this, but maybe somebody has a more robust solution?On 7/18/06, seefai 
[EMAIL PROTECTED] wrote:Hi brother,I am Andy from Malaysia and just a begineer to cakePHP.
I having a problem that when i try to save a Created/Modified date (ByCake's Default) in to the database, i will get 8 hours delay of thetime, can i know how to solve itThanksBest wishes,
Andy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake PHP group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Time Zone ?

2006-07-18 Thread Chris Lamb

Andy, 

Cake's 'created' and 'modified' magic uses the PHP date() function. The
Best Practice for dates is to store all dates interally in UTC/GMT, and
apply an offset on viewing. If you would prefer not to do this, check
out:

http://uk2.php.net/manual/en/function.date-default-timezone-set.php
or
http://uk2.php.net/manual/en/function.setlocale.php

Regards,

Chris


On Tue, 18 Jul 2006 14:01:32 -0700
seefai [EMAIL PROTECTED] wrote:

 
 Hi brother,
 
 I am Andy from Malaysia and just a begineer to cakePHP.
 
 I having a problem that when i try to save a Created/Modified date (By
 Cake's Default) in to the database, i will get 8 hours delay of the
 time, can i know how to solve it
 
 Thanks
 
 Best wishes,
 
 Andy
 
 
 --~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google
 Groups Cake PHP group. To post to this group, send email to
 cake-php@googlegroups.com To unsubscribe from this group, send email
 to [EMAIL PROTECTED] For more options, visit this
 group at http://groups.google.com/group/cake-php
 -~--~~~~--~~--~--~---
 


-- 
 Chris Lamb, Cambridgeshire, UK  [EMAIL PROTECTED]
  WWW: www.chris-lamb.co.uk GPG: 0x634F9A20


signature.asc
Description: PGP signature


Re: Time Zone ?

2006-07-18 Thread Chris Lamb

Oh dear, crossed posts..
 
 I have some basics going for timezones like this, but maybe somebody
 has a more robust solution?

Pear::Date? [1]

Chris

[1] http://pear.php.net/package/Date

-- 
 Chris Lamb, Cambridgeshire, UK  [EMAIL PROTECTED]
  WWW: www.chris-lamb.co.uk GPG: 0x634F9A20


signature.asc
Description: PGP signature


Re: Time Zone ?

2006-07-18 Thread ryanb006

I've used this before (example is US Central Time) in my own
applications, not in Cake PHP.

?php
putenv(TZ=America/Chicago);
?

Ryan


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---