# |
May 31st 2016, 09:08 |
Neon1024 |
echo $this->Form->input('opens'); |
# |
May 31st 2016, 09:08 |
Neon1024 |
date_default_timezone_set('Europe/London'); |
# |
May 31st 2016, 09:07 |
Neon1024 |
But let me double check in the repo |
# |
May 31st 2016, 09:07 |
birdy247 |
so its a series of dropdowns? |
# |
May 31st 2016, 09:07 |
Neon1024 |
Form->input(â??fooâ??, [â??typeâ?? => â??datetimeâ??]) |
# |
May 31st 2016, 09:07 |
birdy247 |
picker* |
# |
May 31st 2016, 09:07 |
birdy247 |
my use case is a datetime picket |
# |
May 31st 2016, 09:07 |
birdy247 |
but on the front end |
# |
May 31st 2016, 09:06 |
Neon1024 |
Standard MySQL datetime |
# |
May 31st 2016, 09:06 |
Neon1024 |
My datetimes are Y-m-d H:i:s in my database |
# |
May 31st 2016, 09:06 |
birdy247 |
what is the format of the string you are converting? |
# |
May 31st 2016, 09:06 |
birdy247 |
'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_GB'), |
# |
May 31st 2016, 09:05 |
Neon1024 |
Time to fire up XDebug ;) |
# |
May 31st 2016, 09:05 |
Neon1024 |
¯\_(ã??)_/¯ |
# |
May 31st 2016, 09:05 |
birdy247 |
gives null |
# |
May 31st 2016, 09:05 |
birdy247 |
$value = parent::_parseValue($value); |
# |
May 31st 2016, 09:05 |
Neon1024 |
ini_set('intl.default_locale', 'en_GB'); |
# |
May 31st 2016, 09:05 |
Neon1024 |
Isnâ??t your applications default locale en_GB ? |
# |
May 31st 2016, 09:04 |
birdy247 |
on the frontend |
# |
May 31st 2016, 09:04 |
birdy247 |
yea, put the string is d-m-Y |
# |
May 31st 2016, 09:04 |
Neon1024 |
Storage and display are different ;) |
# |
May 31st 2016, 09:04 |
Neon1024 |
Y-m-d |
# |
May 31st 2016, 09:04 |
birdy247 |
it needs to be d/m/Y presumably |
# |
May 31st 2016, 09:04 |
unorthodox |
Or am i too paranoid about. Shall i modify data before patchingentity |
# |
May 31st 2016, 09:04 |
Neon1024 |
Y U DO DIS |
# |
May 31st 2016, 09:04 |
Neon1024 |
In your db? |
# |
May 31st 2016, 09:04 |
birdy247 |
I am using d-m-Y |
# |
May 31st 2016, 09:03 |
birdy247 |
Neon1024 I think I know why |
# |
May 31st 2016, 09:03 |
Neon1024 |
Or probably, $this->PrimaryTables->RelatedTables->newEntity() |
# |
May 31st 2016, 09:03 |
unorthodox |
Facepalm |
# |
May 31st 2016, 09:03 |
Neon1024 |
unorthodox, $entity->related = $this->Relateds->newEntity($data) |
# |
May 31st 2016, 09:02 |
unorthodox |
@neon1024: Any clue mate? |
# |
May 31st 2016, 09:01 |
birdy247 |
well its giving me an exception :yum: |
# |
May 31st 2016, 09:01 |
Neon1024 |
https://github.com/davidyell/CakePHP3-Proffer/blob/v0.4.2/docs/configuration.md#configuring-the-behaviour-in-your-table |
# |
May 31st 2016, 09:00 |
birdy247 |
lol |
# |
May 31st 2016, 09:00 |
Neon1024 |
Nah, I like debug output in production :p |
# |
May 31st 2016, 09:00 |
birdy247 |
? |
# |
May 31st 2016, 09:00 |
birdy247 |
without the var_dump |
# |
May 31st 2016, 08:59 |
Neon1024 |
birdy247, Itâ??s what my project uses |
# |
May 31st 2016, 08:59 |
birdy247 |
so is this definatly the finished script? |
# |
May 31st 2016, 08:59 |
Neon1024 |
The way it works in _initializeSchema is not a static call |