Re: [PHP-DEV] Getting separate outputs with Date Functions

2013-03-05 Thread Steve Clay
On Wed, Feb 20, 2013 at 1:54 PM, David Soria Parra wrote: I ran into this myself and I personally consider date() assuming your configured TZ A bug. The description for date() says "local time/date" => considering TZ is not a bug. Timestamps are defined as UTC and the behaviour of DateTime

Re: [PHP-DEV] Getting separate outputs with Date Functions

2013-03-05 Thread Paul Taulborg
On Wed, Feb 20, 2013 at 1:54 PM, David Soria Parra wrote: > On 2013-02-19, Stas Malyshev wrote: >> Hi! >> >>> echo date_create('@1361240634')->format('Y-m-d'); >>> // output: 2013-02-19 >>> >>> echo date('Y-m-d',1361240634); >>> // output: 2013-02-18 >> >> timestamp dates are created with UTC TZ,

Re: [PHP-DEV] Getting separate outputs with Date Functions

2013-02-20 Thread Kris Craig
On Wed, Feb 20, 2013 at 11:54 AM, David Soria Parra wrote: > On 2013-02-19, Stas Malyshev wrote: > > Hi! > > > >> echo date_create('@1361240634')->format('Y-m-d'); > >> // output: 2013-02-19 > >> > >> echo date('Y-m-d',1361240634); > >> // output: 2013-02-18 > > > > timestamp dates are created w

Re: [PHP-DEV] Getting separate outputs with Date Functions

2013-02-20 Thread David Soria Parra
On 2013-02-19, Stas Malyshev wrote: > Hi! > >> echo date_create('@1361240634')->format('Y-m-d'); >> // output: 2013-02-19 >> >> echo date('Y-m-d',1361240634); >> // output: 2013-02-18 > > timestamp dates are created with UTC TZ, date() assumes your configured TZ. I ran into this myself and I per

Re: [PHP-DEV] Getting separate outputs with Date Functions

2013-02-18 Thread Stas Malyshev
Hi! > echo date_create('@1361240634')->format('Y-m-d'); > // output: 2013-02-19 > > echo date('Y-m-d',1361240634); > // output: 2013-02-18 timestamp dates are created with UTC TZ, date() assumes your configured TZ. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (4