Re: How to edit dexterity types without needing to know about their behaviors

Wichert Akkerman <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <[email protected]>
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.


W.

------------------------------------------------------------------------------
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, 801 B)
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJTIt3OAAoJEIqTyjMeUx2L8bQP/1L9w0ciVoSPd8W1VviUJWdL
rzHe/E9nbKI/CZm+1YlTb5hJDsEk2VWgFV3epPCFdX0sD7nfhy1tMbSVoByKmnR9
cBxTEb/yKRO9ZbokpwVZAlh/jGgIUWUMadZ3QgYDQxnm8uTMQiAureGIIYF1eFL9
TsIy/LzKB0B4xzA/OjCTBXAUtQi4a/nQzvqanMlf0P3DYux+Fjrz2G46Jqpqs0Vm
fiIoiWsD0BsNFdxiqnelEYtYMlhmE6o6ZRZ7Mb6Fyf1CwYOs7mrgBYlA37cTCAy6
xQCGLJGyeKoqvKYDOODz2cTW1M3SlzQIZqFncDDQIsSk9VGYluUmQslkI3B+1YY8
jy1ejX0vIcpbD7ilDCN3BC/DkwHb5kX39NL4HIiTvY/hIwmSjBzF8em+OhbtuoJ3
mbAX3u+GydY4Z0jf9+SYFq86dMKYjO4zO4iHDucLDd2y33lFnXt+ZXMCd8WfCrYi
0do09d6JT0Emfe0c0vCp2UZVDi/uvBGkcJTpfDrxda3gwqPZ///TSSqmbOdcmwjb
IURqGvTHhG+v7z47bufYvRcqbr+9+byxtaw3xxRv2PGoYY8AGqHwByansKrTZgsL
hC/pBTqAQTW7WQvPeHS10QRRaZBd+UoZPTmHSkXpu//PW4Vi20gyQrZJ2+H9TNjL
f94IbXuPstuh/s+/J7ye
=wA36
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.