Log message #4048740

# At Username Text
# Jul 6th 2017, 09:23 savant but using utc always is a good default
# Jul 6th 2017, 09:23 savant your app should follow the server
# Jul 6th 2017, 09:23 savant or at least move your server to utc +3
# Jul 6th 2017, 09:22 savant always use UTC
# Jul 6th 2017, 09:22 savant UTC
# Jul 6th 2017, 09:22 glanceded should them both be on same utc or utc + 0?
# Jul 6th 2017, 09:20 glanceded @savant yes, they are different timezones. One is utc +2 and the db is utc +3. But cake is running on utc +2.
# Jul 6th 2017, 09:18 neothermic ahh, cool
# Jul 6th 2017, 09:18 savant probably
# Jul 6th 2017, 09:18 savant and wrap that in a try catch
# Jul 6th 2017, 09:18 savant and return the result
# Jul 6th 2017, 09:18 savant neothermic you can call render manually
# Jul 6th 2017, 09:18 neothermic In cake2, if I'm using a media view, is there any way to catch a NotFoundException if the file isn't found? I see no easy place to try/catch that error, as you just set the viewClass to Media and set some params, and cake does the rest.
# Jul 6th 2017, 09:17 glanceded let me check
# Jul 6th 2017, 09:16 savant they should be the same timezone, and should be utc
# Jul 6th 2017, 09:16 savant are your database and server on different timezones?
# Jul 6th 2017, 09:16 glanceded when it's suposed to be 15 seconds
# Jul 6th 2017, 09:16 glanceded But it seems the difference is about one hour
# Jul 6th 2017, 09:15 glanceded create a guid, add it to db and let cake take care of created and modified fields. Right after that I compare it with Chronos ->gt and I allow a window of 15 minutes for that token to be active.
# Jul 6th 2017, 09:14 glanceded for not converting the timezone...or I don't know, let me give an example
# Jul 6th 2017, 09:13 savant a Chronos setting for what?
# Jul 6th 2017, 09:13 glanceded I'm using Chronos all the time in my cake project, but it seems a have differences when comparing dates. Is there a Chronos setting? It seems Chorons is taking one hour from the original date. I can guess it's about the timezone.
# Jul 6th 2017, 08:51 jarard01 it seems the same inputContainer is always used
# Jul 6th 2017, 08:51 jarard01 using form templates how can I add different id's to a form group
# Jul 6th 2017, 08:40 juststeveking Are ROutes also cached with cake2
# Jul 6th 2017, 08:36 neon1024 Unless you’re writing an integration test, I suppose, which might rely on global state
# Jul 6th 2017, 08:36 neon1024 Plus, it would mean you’re not really doing unit testing, because you’re using side effects from the test
# Jul 6th 2017, 08:35 neon1024 If you change global state for a test, you’ll encounter all kinds of problems in your test suite
# Jul 6th 2017, 08:35 neon1024 I wouldn’t set your whole app’s datetime for a test, I’d mock out those parts which need the time and set it manually in the test
# Jul 6th 2017, 08:34 glanceded date --set="1 JAN 2017 10:00:00" ?
# Jul 6th 2017, 08:34 neothermic @neon1024 ^^ it can timetravel :)
# Jul 6th 2017, 08:34 kareylo Just mock ?
# Jul 6th 2017, 08:34 birdy247 Chronos::setTestNow(Chronos::now());
# Jul 6th 2017, 08:34 birdy247 it does :)
# Jul 6th 2017, 08:34 neon1024 @neothermic It actually isn’t, as it’s immutable :P
# Jul 6th 2017, 08:34 birdy247 Ah
# Jul 6th 2017, 08:34 kareylo Oh.
# Jul 6th 2017, 08:33 birdy247 I mean so the entrie app thinks today is 1st jan
# Jul 6th 2017, 08:33 neothermic Chronos is allowed to time travel :P
# Jul 6th 2017, 08:33 kareylo https://book.cakephp.org/3.0/en/chronos.html
# Jul 6th 2017, 08:33 kareylo Sorry, french version :')