Re: How to edit dexterity types without needing to know about their behaviors
Andreas Jung <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Johannes Raggam wrote: > On Fri, 2014-03-14 at 11:45 +0100, Wichert Akkerman wrote: >> On 14 Mar 2014, at 11:02, Johannes Raggam <[email protected]> >> wrote: >> >>> On Fri, 2014-03-14 at 10:18 +0100, Wichert Akkerman wrote: >>>> On 14 Mar 2014, at 09:40, ajung <[email protected]> wrote: >>>> >>>>> johannes raggam wrote >>>>>> i'll fix that, probably at the wine and beer sprint. but >>>>>> then you'll still always get UTC datetime values instead of >>>>>> localized ones, if you get the start/end attributes >>>>>> directly from the context. >>>>>> >>>>>>> Consistency-is-king Andreas >>>>>> pragmatism is okay. johannes >>>>> I don't care about localized datetime values. Dates should >>>>> always be stored and manipulated using UTC in the same way as >>>>> any we should deal (in theory) with unicode strings >>>>> internally. Localized datetime values and utf-8 encoded >>>>> strings are value for presentation purposes, not for >>>>> processing purposes. >>>> +infinity >>> read my mail and the code and you will see that datetimes are >>> stored in UTC. >>> >> >> Looking at the code you store with a fake timezone, which sounds >> just as bad if not worse. I strongly suggest to use date time >> instances without any tzone in UTC, and only add a timezone and >> convert as necessary on display/edit. > > the fakezone is removed in the data_postprocessing step and the > value converted to UTC. > > it was necessary to let z3c.form compare a floating-timezone value > from the widget to a possibly timezone aware value (UTC), already > stored on the content object. > > looks like your're not carefully reading mails. or i'm not clear > enough. Possibly - because requirements for setting start and end dates are crazy. Not only that you need the IEventBasic adapter, you also need to call an event subscriber...but I will now stfu...I hope you all got my point that one can one design and implement a Dexterity backend API this way. - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJTIuJkAAoJEADcfz7u4AZjQd8Lv282nSC3XIO6fn4YIx82TyXT /PTAs+oXXLUGjmZsNk+5pHxu1+dLQaQqcswHtos8W+Z0DKr329KzDtZR3XO8uD+b cHRxPhkaqf2Jyr42nBOkb5SICUHonMe1BNiD6w2SbMCp4Ggpy0v5zGLQ7B94A4Ej qY78YBUv2wnHnK50k8RrO/n7w5b0WtjCRPmoefXciFhRLKyDn4zpBXohIoucRtf8 BtIu2s+8Mezb2dhuvoD2/YgOt+lv/R8qSZp11u3xNVZYUkGue6GLhuXhRCva6s6o BTTjDQnyuZXCMNoMQC/xiEp2u6sYXOfXNygidzdX63fSDO3hM3dm9uFEE1afchOR 2pCR5DeAzefS8sZNRT2z2MHxH2hpPDz/aI27mdE7dHbdvdMuWfZnkMWMD4KbT1jE 83hB76Y9DslvNpzNuAi5J+l+zb27RK/LZzeTcjrNzMRZr+uALvZsm5dyCZwsISLn 0D4U/D8+4q3kyBaS02DalvBdPnUqif4= =R5xo -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech