# |
Feb 2nd 2018, 12:48 |
max775 |
yeaaah I noticed that... damn stuff... everything is working besides this shitty date XD ok ill try to get everything to UTC and see if its working thenˆ^ thanks |
# |
Feb 2nd 2018, 12:46 |
openmail_slack |
The DB should always be UTC. Then make sure that you only put UTC times into the DB (convert or run the server on UTC). Then output the date on the page by the setting your user (in his settings) or you as app creator have chosen. Internally in your you only want to talk in UTC, everything else is PITA |
# |
Feb 2nd 2018, 12:46 |
max775 |
hmm okˆ^ then Ill have to ask my boss if we can change the server timezone to UTC ;) is just the question if this does conflict with the other running systems on the serv currently its CET |
# |
Feb 2nd 2018, 12:44 |
hmic |
everything else should always, always, always be UTC ;) |
# |
Feb 2nd 2018, 12:44 |
hmic |
you decide which timezone to display *on output* to the client and on it's behalf only |
# |
Feb 2nd 2018, 12:43 |
hmic |
max775: your server should be utc, your database should be and your app should be too |
# |
Feb 2nd 2018, 12:43 |
max775 |
ahh so I need to set the same as my server as timezone? Or is UTC ok? |
# |
Feb 2nd 2018, 12:42 |
hmic |
admad: so the solution is to extend the helper *and* view to load it, like you would anyway expect when using the viewbuilder? |
# |
Feb 2nd 2018, 12:40 |
openmail_slack |
Also note the `timezone` option at https://book.cakephp.org/3.0/en/orm/database-basics.html#configuration |
# |
Feb 2nd 2018, 12:38 |
max775 |
lets see if this changes sth :slightly_smiling_face: |
# |
Feb 2nd 2018, 12:36 |
max775 |
hmm thanks Ill try that, Ill change all zones to UTC in my app, the server is set to CET |
# |
Feb 2nd 2018, 12:35 |
neon1024 |
When using `bin/cake plugin assets symlink` is the intention to commit the resulting symlinks to your repo? I’ve added the command to my Composer `post-install-cmd` and I keep getting errors for missing plugins, because they are dev dependency plugins, like Bake and DebugKit |
# |
Feb 2nd 2018, 12:33 |
openmail_slack |
The best practice is to run the DB as UTC (all dates stored as UTC). Then the app converts the date to the required timezone (e.g. server timezone). |
# |
Feb 2nd 2018, 12:30 |
slackebot |
db. Can somebody maybe help me, or somebody had a similiar problem? |
# |
Feb 2nd 2018, 12:30 |
max775 |
Hello guys, I have a question... Im trying for some hours now to solv a problem Im having with saving timestamps as date in a mysql table with the patchEntity() and save() method. But the problem is that the CORRECT! timestamp is always saved 1 date to early.... I checked all the timezones on the server and also in my cakephp instance and they are all set to CET and also cake php echos the timestamp as correct date, just saves it wrong to my |
# |
Feb 2nd 2018, 12:29 |
k4t |
Hello |
# |
Feb 2nd 2018, 12:09 |
neon1024 |
Am I missing a debugkit panel? |
# |
Feb 2nd 2018, 12:09 |
neon1024 |
Anyone know why I keep getting 404 requests to this url? `/debug-kit/panels/view/undefined` |
# |
Feb 2nd 2018, 12:06 |
dan_w |
oller from the view. What would be correct? |
# |
Feb 2nd 2018, 12:06 |
dan_w |
Hi all. I have a simple cakephp site, with my pages and articles controllers. On just one of my pages, I would like to display some of my articles. Not sure what the correct way is: in the controller, it seems wrong to check if page is a specific one before querying articles and seting the variable, but also seems wrong to access the articles contr |
# |
Feb 2nd 2018, 11:58 |
ooskar1233 |
I'm doing just like you, but don't user phpstorm ;) |
# |
Feb 2nd 2018, 11:55 |
neon1024 |
How do you guys docblock a method which has a conditional return, or no return? As php storm tells me I’m not allowed to use `* @return \Cake\Http\Response|null|void` |
# |
Feb 2nd 2018, 11:51 |
admad |
Using timeAgoInWords() is not a very good default anyway, will see with savant if we can change it |
# |
Feb 2nd 2018, 11:49 |
admad |
I have also extended CrudView and use that so can control helper loading :) |
# |
Feb 2nd 2018, 11:40 |
hmic |
thanks! |
# |
Feb 2nd 2018, 11:40 |
hmic |
as i cannot work it out in any of the common ways - well, basically using the viewBuilder()->setHelpers() |
# |
Feb 2nd 2018, 11:40 |
hmic |
i'm curious on how you did it ;-) |
# |
Feb 2nd 2018, 11:39 |
hmic |
that would be great admad! |
# |
Feb 2nd 2018, 11:39 |
hmic |
but i cannot inject my extended helper to get used :( |
# |
Feb 2nd 2018, 11:39 |
admad |
I have extended and aliased CrudHelper btw, will let you know when I am at a PC |
# |
Feb 2nd 2018, 11:39 |
hmic |
i'm ok with extending the crudviewhelper to do it |
# |
Feb 2nd 2018, 11:39 |
hmic |
i just want to change the timeagoinwords application wide |
# |
Feb 2nd 2018, 11:39 |
hmic |
in 20 controllers with total of 50 date fields? |
# |
Feb 2nd 2018, 11:38 |
admad |
hmic: you can use 'formatter' key in field options and use a callback to return the format you want |
# |
Feb 2nd 2018, 11:34 |
hmic |
or can someone enlight me on the proper way to do that? :O |
# |
Feb 2nd 2018, 11:34 |
hmic |
this design is seriously unextendable, very close to broken |
# |
Feb 2nd 2018, 11:33 |
hmic |
well, the next proper solution, to extend the CrudViewHelper in the app and replace the Alias is not working too, as the CrudView decides to load the helpers first, before the ViewBuidler() can inject the helpers that are confiured. no option to configure what CrudView loads *at all* |
# |
Feb 2nd 2018, 11:25 |
rudy1976s |
I have tried to rewrite the route to a more readable link but I think i lost the data posted: do is posible rewrite postLinks routes ? |
# |
Feb 2nd 2018, 11:24 |
rudy1976s |
I created a link using postLink because I need to pass to controller some values in post |
# |
Feb 2nd 2018, 11:23 |
rudy1976s |
good morning! |
# |
Feb 2nd 2018, 10:51 |
hmic |
ooskar1233: i can certainly hack the hell out of it, but i was looking for a proper solution. which does just not exist from what i've seen now. :$ |