hi,
I was messing around with FrozenTime, and notice this. Referring to cake 4 time-docs
In Manipulation, it gives an example of FrozenTime
. The example doesn’t work. Only setDate
works. Am I missing something ?
$now = FrozenTime::now();
debug( $now );
// Output :object(Cake\I18n\FrozenTime) id:0 {
// 'time' => '2021-06-05 22:15:58.481856+08:00'
$now->year(2013)
->month(10)
->day(31);
debug( $now );
// Output : object(Cake\I18n\FrozenTime) id:0 {
// 'time' => '2021-06-05 22:15:58.481856+08:00'
$now = $now->setDate(2013, 10, 31);
debug( $now );
// Output :object(Cake\I18n\FrozenTime) id:0 {
// 'time' => '2013-10-31 22:15:58.481856+08:00'