j'ai trouvé la solution (c'est aberrant mais bon ...)
dans mon CalendarController j'ai fait :
function edit {
[...]
if (empty($this->data)) {
$this->data = $this->Calendar->read(null, $id);
}
#as CakePHP does not "understand" a unix timestamp i force the type to
integer thus Cake will see
#it correctly to transform the timestamp in 3 arrays for the date;
$this->data['Calendar']['date'] = (integer) $this->data['Calendar']
['date'];
}
et hop ca marche :P
comme cela "j'entre" ligne 1389 du helper form
extrait ligne 1385 - 1391 :
if (!empty($selected)) {
if (is_array($selected)) {
extract($selected);
} else {
if (is_int($selected)) {
$selected = strftime('%Y-%m-%d
%H:%M:%S', $selected);
}
la condition if (is_int($selected)) est étrangement pas rencontrée
avec sa colonne en timestamp tant qu'on ne lui force pas le typage
comme je l'ai fait dans ma méthode edit...
Cdt.
ps: et hop un post sur le blog ca mérite ;)
On 8 juin, 20:26, Lionel <[EMAIL PROTECTED]> wrote:
> Je ne savais plus sur quelle version tu bossais, mais je m'en doutais un
> peu ...
>
> foxmask a écrit :
>
> > /**
> > * Deprecated, see Model::deconstruct();
> > *
> > * @see Model::deconstruct()
> > * @deprecated as of 1.2.0.5970
> > */
> > function cleanUpFields($modelClass = null) {
> > trigger_error(__('Controller::cleanUpFields() - Deprecated: this
> > functionality has been moved to Model and is handled automatically',
> > true), E_USER_WARNING);
> > }
>
> > *glups* :(
>
> > On 8 juin, 17:44, Lionel <[EMAIL PROTECTED]> wrote:
>
> >> Tu peux aller voir $controller->cleanUpFields ?
>
> >> Je sais que j'ai bien galéré avec les dates.
> >> Si quelqu'un peut sortir un guide méthodologique....
>
> >> Lionel
--~--~---------~--~----~------------~-------~--~----~
Groupe "Cakephp-fr".
Adresse : [email protected]
Pour résilier : [EMAIL PROTECTED]
Pour les options : http://groups.google.com/group/cakephp-fr?hl=fr
-~----------~----~----~----~------~----~------~--~---