# |
May 30th 2016, 08:38 |
ionas |
birdy https://github.com/cakephp/cakephp/pull/8753 |
# |
May 30th 2016, 08:38 |
birdy247 |
https://github.com/cakephp/cakephp/pull/8588 |
# |
May 30th 2016, 08:38 |
birdy247 |
:slightly_smiling_face: |
# |
May 30th 2016, 08:37 |
ionas |
;p |
# |
May 30th 2016, 08:37 |
ionas |
JohnWayne, birdy247: yes, fork/pull it from my repo, fix the missing unit test, PR and use in 3.3 :p |
# |
May 30th 2016, 08:37 |
JohnWayne |
@ionas - is there any manual how to use this PR? |
# |
May 30th 2016, 08:37 |
birdy247 |
will this be included in 3.3 |
# |
May 30th 2016, 08:37 |
birdy247 |
awesome |
# |
May 30th 2016, 08:36 |
birdy247 |
:+1: |
# |
May 30th 2016, 08:36 |
ionas |
because you were complaining :p rightly so |
# |
May 30th 2016, 08:36 |
birdy247 |
:slightly_smiling_face: |
# |
May 30th 2016, 08:36 |
ionas |
I did the PR just for you |
# |
May 30th 2016, 08:36 |
ionas |
it does |
# |
May 30th 2016, 08:36 |
birdy247 |
ionas does this introduce a default timezone for output |
# |
May 30th 2016, 08:35 |
ionas |
if you donâ??t use those methods it is â??maybeâ? save to use ;) |
# |
May 30th 2016, 08:35 |
ionas |
well see the tests that donâ??t run |
# |
May 30th 2016, 08:34 |
hmic |
use ionas PR. |
# |
May 30th 2016, 08:34 |
hmic |
yes |
# |
May 30th 2016, 08:34 |
JohnWayne |
I am already using this way $time->nice('Europe/Paris', 'fr-FR'); but in the future I want to create Profile settings and put array with all Zones so that user can pick up what he/she wants... and I have read in Cakephp Doc that the best way is working only in UTC-0 (in DB) |
# |
May 30th 2016, 08:33 |
hmic |
unorthodox: thats ouput formatting, not output timezone |
# |
May 30th 2016, 08:32 |
unorthodox |
$time->i18nFormat(\IntlDateFormatter::FULL, 'Europe/Paris', 'fr-FR'); $time->nice('Europe/Paris', 'fr-FR'); |
# |
May 30th 2016, 08:32 |
unorthodox |
JohnWayne, according to docs you can do that. |
# |
May 30th 2016, 08:32 |
ionas |
JohnWayne if you want to take a look it only has small issues, however I could not figure out why these small issues/test cases dont run |
# |
May 30th 2016, 08:31 |
hmic |
https://github.com/cakephp/cakephp/pull/8753 |
# |
May 30th 2016, 08:31 |
JohnWayne |
Ok, thx |
# |
May 30th 2016, 08:31 |
JohnWayne |
@mohand 3.2 |
# |
May 30th 2016, 08:31 |
mohand |
just search for UTC in bootstrap.php |
# |
May 30th 2016, 08:31 |
mohand |
@johnwayne which version of cakephp ? because in cake 3, you have an option in bootstrap |
# |
May 30th 2016, 08:30 |
hmic |
functionality like that will be available in a upcoming release very likely, yes. |
# |
May 30th 2016, 08:30 |
mohand |
to be sure, try an echo and die in the model to see if it passes there when you bake |
# |
May 30th 2016, 08:29 |
mohand |
maybe not with bake |
# |
May 30th 2016, 08:29 |
JohnWayne |
can you send me link from that PR.... and is this solution good $user->created->nice('Europe/Paris') |
# |
May 30th 2016, 08:29 |
alanderouen |
mohand : ok, it worked, but datasource for model should be detected. I guess i'm doing something wrong. |
# |
May 30th 2016, 08:28 |
hmic |
there is a PR open from ionas that handles the output case quite well |
# |
May 30th 2016, 08:28 |
JohnWayne |
And what is your suggestion with conversation. I am now using nice()... Idknw is this good solution |
# |
May 30th 2016, 08:28 |
hmic |
you should only (need to) convert the timezone on output or from user input. |
# |
May 30th 2016, 08:27 |
hmic |
this is utc by default, which is a good default. |
# |
May 30th 2016, 08:27 |
hmic |
JohnWayne, nope. not yet at least. it is good practice to work in a single timezone throught the whole app! |
# |
May 30th 2016, 08:26 |
mohand |
public function __construct (){ |
# |
May 30th 2016, 08:26 |
alanderouen |
mohand : haa. I see. Ok. It should work |
# |
May 30th 2016, 08:26 |
mohand |
<?php class DATABASE_CONFIG { public $default = null; |