right you would have to convert it back again of course find() => behavior converts all to local time save() => behavior converts all to UTC (cake inserts new dates in UTC anyway)
probably quite some overhead but it should keep it clean. as of right now I simply set the timezone fixed to LONDON/BERLIN in the core and will not deal with until absolutely necessary :) On 4 Nov., 14:55, Jeremy Burns | Class Outfit <[email protected]> wrote: > I was thinking of the new key to display a localised version, but keep the > old one for editing; if you just convert it and then save the record it'd > save the 'local' version, wouldn't it? > > Jeremy Burns > Class Outfit > > http://www.classoutfit.com > > On 4 Nov 2011, at 13:32, euromark wrote: > > > > > > > > > probably > > i wouldt apply new keys then, just override the old ones. > > if you don't change the current keys your forms will have to be > > modified. > > > There is no jack of all trades device for this, i guess. > > > setting the default_time_zone to your location only fixes the dtc > > problem for this specific country. > > not setting it (to UTC so to speak) would be the right way to go + > > above approach which will probably add some overhead. > > > I cant think of a different solution. > > > On 4 Nov., 14:15, Jeremy Burns | Class Outfit > > <[email protected]> wrote: > >> Couldn't you do an afterFind in a behaviour that sets new keys like > >> 'LocalTime'? > > >> Jeremy Burns > >> Class Outfit > > >>http://www.classoutfit.com > > >> On 4 Nov 2011, at 13:04, euromark wrote: > > >>> maybe you can adopt some of this > >>>https://raw.github.com/jellehenkens/lemon_utils/master/View/Helper/Ti... > > >>> I am wondering: > >>> How do you guys handle the daylight saving time issue? > >>> Currently we face this problem in 2.0: > >>> - dates (created, modified, own ones) are saved without it (-1 hour > >>> offset from the current time) > >>> - returning them from DB, though, leaves them untouched (still -1 > >>> offset) > >>> - using a time helper that is aware of timezones we can correct it > >>> back to 0 offset for output > >>> But what with forms that directly use the content of the DB? they will > >>> contain the -1 offset which can be confusing. > > >>> wouldnt it be better to modify the dates right when they come out of > >>> the DB to ensure all methods (controller, model, view level) use the > >>> same offset? and make sure they are modified back on save? > >>> or how do you handle it? manually adjust dates used in forms? > > >>> of course the same goes for more than just DST - complete timezone > >>> changes etc. > > >>> On 29 Okt., 06:17, Ryan Schmidt <[email protected]> wrote: > >>>> On Oct 26, 2011, at 01:25, Shanaka wrote: > > >>>>> I'm creating a web application using cakephp 1.2.6. > > >>>> Why would you use 1.2.x to create a new web app, and not 2.0? Even using > >>>> 1.3.x would be better but I don't see why you wouldn't start with the > >>>> latest and greatest. Converting your app later to use a newer version of > >>>> CakePHP will involve non-zero effort, so I'd think you'd want to spare > >>>> yourself that work. > > >>> -- > >>> Our newest site for the community: CakePHP Video > >>> Tutorialshttp://tv.cakephp.org > >>> Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > >>> others with their CakePHP related questions. > > >>> To unsubscribe from this group, send email to > >>> [email protected] For more options, visit this group > >>> athttp://groups.google.com/group/cake-php > > > -- > > Our newest site for the community: CakePHP Video > > Tutorialshttp://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
