Log message #3884230

# At Username Text
# May 31st 2016, 10:24 phpcoder guys
# May 31st 2016, 10:23 unorthodox Handle it through your `UsersController->view()` function?
# May 31st 2016, 10:21 spriz Whatâ??s the best way of making something like /users/view work without actually using a id in the URL? Iâ??m using CRUD atm, and Iâ??m thinking between making a custom action for it, or one could redirect to /users/view/$id
# May 31st 2016, 10:09 birdy247 this was after advise from @lorenzo
# May 31st 2016, 10:09 birdy247 @neon1024: I removed the ->useLocaleParser(); and my old way continued working
# May 31st 2016, 09:59 birdy247 around here Type::build('datetime')
# May 31st 2016, 09:59 birdy247 Neon1024 what does your bootstrap look like
# May 31st 2016, 09:55 birdy247 I tried jose_zaps revission
# May 31st 2016, 09:44 Neon1024 I donâ??t get any errors at least :p
# May 31st 2016, 09:44 Neon1024 Unless it doesnâ??t
# May 31st 2016, 09:44 Neon1024 Sorry, it works fine for me
# May 31st 2016, 09:40 birdy247 so so difficult to achieve something that seems so so easy lol
# May 31st 2016, 09:40 birdy247 face palm
# May 31st 2016, 09:40 birdy247 Neon1024 the problem with that is it then doesnt return a datetime object when i do a find()
# May 31st 2016, 09:33 unorthodox :)
# May 31st 2016, 09:32 Neon1024 p
# May 31st 2016, 09:32 Neon1024 https://github.com/davidyell/CakePHP3-Proffer/blob/master/src/Database/Type/FileType.php
# May 31st 2016, 09:32 Neon1024 Check out my super complex data type class
# May 31st 2016, 09:32 Neon1024 Just do that, but in a data type class
# May 31st 2016, 09:29 birdy247 and stop cake doing any marshalling of datetime for me and I do it in the entity myself using createFromFormat
# May 31st 2016, 09:28 birdy247 unless I make a "plain" data type
# May 31st 2016, 09:28 birdy247 my previous way of solving it doesnt work
# May 31st 2016, 09:28 birdy247 the annoying part is I go through this every time I start a new cake project on a higher version :slightly_smiling_face:
# May 31st 2016, 09:21 birdy247 https://gist.github.com/birdy247/f6305db312419420c2f94ecd58046f72
# May 31st 2016, 09:19 Neon1024 Iâ??ve not looked at it in this degree of detail since 2016-02-10
# May 31st 2016, 09:19 Neon1024 From what I remember
# May 31st 2016, 09:18 Neon1024 Yes, so I can have in my CMS set a datetime in BST and itâ??ll save in UTC, and I can load a UTC from the db and marshall to local timezone
# May 31st 2016, 09:18 birdy247 so with your script Neon1024, should it basiclaly override the cake stuff, and instead create with the local timezone and then convert to UTC
# May 31st 2016, 09:18 storkovo birdy247: that snippet didnâ??t make it to the irc channel
# May 31st 2016, 09:17 birdy247 cake has already converted my string into a datetime object
# May 31st 2016, 09:17 birdy247 the easiest way I can see
# May 31st 2016, 09:16 unorthodox How i can retrieve entity's id on beforeMarshal?
# May 31st 2016, 09:15 birdy247 can you see that on IRC?
# May 31st 2016, 09:14 Neon1024 I just have the 1 project where I need to do it really
# May 31st 2016, 09:13 Neon1024 Hopefully something can be implemented in Chronos or CakePHP to deal with it in a concise and elegant way
# May 31st 2016, 09:13 Neon1024 Perhaps have a look for an issue in Github, as youâ??re not alone trying to solve this problem
# May 31st 2016, 09:13 Neon1024 I like the data type class though as it feels a logical fit
# May 31st 2016, 09:12 birdy247 and have done on every other project
# May 31st 2016, 09:12 birdy247 this is what I want to do :slightly_smiling_face:
# May 31st 2016, 09:12 Neon1024 The suggestion at Cakefest was to store in UTC and write your own helper for front-end
# May 31st 2016, 09:12 birdy247 I am clearly doing something wrong