Re: How to edit dexterity types without needing to know about their behaviors
Johannes Raggam <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
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. > > > > > W. > > -- programmatic web development di(fh) johannes raggam / thet python plone zope development plone framework team member mail: office-//[email protected] web: http://programmatic.pro http://bluedynamics.com ------------------------------------------------------------------------------ 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 _______________________________________________ Plone-developers mailing list Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-developers
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEABECAAYFAlMi4BQACgkQW4mNMQxDgAcSSgCeKK3j4ygCMeLuqlkHpfnTTwbp ckAAniVJh+noI1Db/sgcY1iaeNRfyBVE =iRj2 -----END PGP SIGNATURE-----