| *** palmTree has quit IRC | 00:39 | |
| *** srichter has quit IRC | 00:58 | |
| *** C81 has joined #zope3-dev | 01:02 | |
| C81 | hi | 01:02 |
|---|---|---|
| *** C81 is now known as C8N | 01:02 | |
| *** dlk has quit IRC | 01:07 | |
| *** bradb has quit IRC | 01:17 | |
| *** KurtB has left #zope3-dev | 01:22 | |
| *** mexiKON has joined #zope3-dev | 01:25 | |
| *** Damascus- has joined #zope3-dev | 01:25 | |
| *** projekt01 has left #zope3-dev | 01:26 | |
| *** Damascene has quit IRC | 01:29 | |
| *** Damascus- is now known as Damascene | 01:32 | |
| *** alga has quit IRC | 01:35 | |
| *** philiKON has quit IRC | 01:36 | |
| *** hazmat has quit IRC | 01:37 | |
| *** srichter has joined #zope3-dev | 01:40 | |
| *** efge has quit IRC | 01:45 | |
| *** bradb has joined #zope3-dev | 01:46 | |
| *** bskahan has quit IRC | 02:06 | |
| *** C8N has quit IRC | 02:10 | |
| *** tarek_ has quit IRC | 02:11 | |
| *** J1m has quit IRC | 02:16 | |
| *** bskahan has joined #zope3-dev | 02:22 | |
| *** dafreedm has left #zope3-dev | 02:34 | |
| *** `anthony has quit IRC | 02:39 | |
| *** `anthony has joined #zope3-dev | 02:39 | |
| *** FarcePest has quit IRC | 02:44 | |
| *** Damascene has quit IRC | 02:48 | |
| *** Damascene has joined #zope3-dev | 02:49 | |
| *** FarcePest has joined #zope3-dev | 03:16 | |
| *** hazmat has joined #zope3-dev | 03:29 | |
| *** bskahan has quit IRC | 03:53 | |
| *** bskahan has joined #zope3-dev | 04:00 | |
| *** stub has joined #zope3-dev | 04:05 | |
| *** Damascene has quit IRC | 04:06 | |
| *** Damascene has joined #zope3-dev | 04:08 | |
| *** RaFromBRC has quit IRC | 04:25 | |
| *** hazmat has quit IRC | 04:34 | |
| *** bskahan has quit IRC | 05:06 | |
| *** MiUlEr has quit IRC | 05:22 | |
| *** hazmat has joined #zope3-dev | 06:33 | |
| *** mexiKON has quit IRC | 08:01 | |
| *** `anthony has quit IRC | 08:21 | |
| *** viyyer has joined #zope3-dev | 08:30 | |
| *** d2m has quit IRC | 08:45 | |
| zagy | moin | 09:04 |
| SteveA | moin | 09:11 |
| *** sashav has joined #zope3-dev | 09:13 | |
| zagy | SteveA: hi | 09:14 |
| *** d2m has joined #zope3-dev | 09:17 | |
| *** dlk has joined #zope3-dev | 09:20 | |
| *** mooded has joined #zope3-dev | 09:20 | |
| *** dlk has left #zope3-dev | 09:21 | |
| *** hdima has joined #zope3-dev | 09:22 | |
| *** `anthony has joined #zope3-dev | 09:24 | |
| *** projekt01 has joined #zope3-dev | 10:02 | |
| *** Theuni has joined #zope3-dev | 10:22 | |
| *** ignas has joined #zope3-dev | 10:27 | |
| *** Theuni has quit IRC | 10:37 | |
| *** viyyer is now known as viyyer|lunch | 10:46 | |
| *** lunati1 has joined #zope3-dev | 10:53 | |
| *** lunati1 is now known as luunatik | 10:56 | |
| *** luunatik has left #zope3-dev | 10:59 | |
| *** Theuni has joined #zope3-dev | 11:05 | |
| *** viyyer|lunch is now known as viyyer | 11:13 | |
| *** hazmat has quit IRC | 11:21 | |
| *** Theuni has quit IRC | 11:45 | |
| *** Theuni has joined #zope3-dev | 11:45 | |
| *** Aiste has quit IRC | 11:55 | |
| *** tarek_ has joined #zope3-dev | 12:12 | |
| *** hazmat has joined #zope3-dev | 12:14 | |
| *** admp has joined #zope3-dev | 12:21 | |
| *** `anthony has quit IRC | 12:52 | |
| tarek_ | srichter: ayt ? | 13:03 |
| *** efge has joined #zope3-dev | 13:10 | |
| *** admp has joined #zope3-dev | 13:12 | |
| *** `anthony has joined #zope3-dev | 13:27 | |
| *** admp has joined #zope3-dev | 13:39 | |
| *** nturner has quit IRC | 13:46 | |
| srichter | tarek_: I will be online in about 3 hours | 14:02 |
| tarek_ | sashav: ok | 14:03 |
| tarek_ | oups | 14:03 |
| tarek_ | srichter: ok | 14:03 |
| *** projekt01 has left #zope3-dev | 14:08 | |
| *** MiUlEr has joined #zope3-dev | 14:13 | |
| *** bskahan has joined #zope3-dev | 14:18 | |
| *** Aiste has joined #zope3-dev | 14:24 | |
| *** srichter has quit IRC | 14:28 | |
| *** lunatik has joined #zope3-dev | 14:34 | |
| *** faassen has joined #zope3-dev | 14:37 | |
| *** tav|offline has quit IRC | 14:42 | |
| *** alga has joined #zope3-dev | 14:43 | |
| *** tav|offline has joined #zope3-dev | 14:45 | |
| *** regebro has joined #zope3-dev | 14:49 | |
| *** gintas has joined #zope3-dev | 15:04 | |
| *** mkerrin has joined #zope3-dev | 15:09 | |
| *** Arnia has left #zope3-dev | 15:28 | |
| *** AJC has quit IRC | 15:44 | |
| *** hdima has quit IRC | 15:46 | |
| *** SteveA has quit IRC | 15:52 | |
| *** J1m has joined #zope3-dev | 15:56 | |
| *** SteveA has joined #zope3-dev | 15:56 | |
| *** gintas has quit IRC | 16:01 | |
| *** admp has joined #zope3-dev | 16:02 | |
| *** bradb has quit IRC | 16:10 | |
| *** zagy has quit IRC | 16:14 | |
| *** philiKON has joined #zope3-dev | 16:14 | |
| *** bradb has joined #zope3-dev | 16:25 | |
| *** niemeyer has joined #zope3-dev | 16:46 | |
| *** mohsenX has joined #zope3-dev | 16:54 | |
| *** srichter has joined #zope3-dev | 17:07 | |
| philiKON | moin srichter | 17:07 |
| srichter | hi | 17:07 |
| *** ChanServ sets mode: +o srichter | 17:07 | |
| tarek_ | hi srichter | 17:09 |
| *** bska|mobile has joined #zope3-dev | 17:09 | |
| srichter | tarek_: hi | 17:09 |
| lunatik | hi tarek_ : | 17:11 |
| lunatik | :) | 17:11 |
| tarek_ | i was wondering something about zope.app.datetimeutils | 17:11 |
| tarek_ | is there any other utility in zope 3 than DateTimeParser that can be used to normalize dates | 17:13 |
| srichter | tarek_: noone should use datetimeutils :-) | 17:14 |
| tarek_ | it works fine except for some extended times | 17:14 |
| srichter | I really should propose to deprecate it :-) | 17:14 |
| tarek_ | oups | 17:14 |
| srichter | what you should use is the datetime parser in zope.i18n | 17:15 |
| tarek_ | i am using it to parse mail dates | 17:15 |
| tarek_ | ok thanks | 17:15 |
| srichter | it is pattern-based, like you are used to it in Excel/Calc for example | 17:15 |
| tarek_ | ok | 17:15 |
| *** bskahan has quit IRC | 17:15 | |
| tarek_ | good to know - i'll change that thanks | 17:16 |
| *** tvon has joined #zope3-dev | 17:16 | |
| srichter | tarek_: the zope.i18n code is not as userfriendly, but it does not guess | 17:16 |
| srichter | which is a good thing | 17:16 |
| srichter | it does what you tell it | 17:17 |
| bska|mobile | tarek_: pytz has a normalize routine | 17:17 |
| tarek_ | my use case is to try to guess the date out of any mail date string | 17:17 |
| tarek_ | like datetimeparser does | 17:17 |
| srichter | if you want to be able to detect several different formats, you have to write a high-level function that tries several patterns | 17:17 |
| tarek_ | ok, in my test cases, DateTimeParser passed all weird forms except the one with extra info like : Tue, 5 Apr 2005 11:33:39 +0200 (CEST) | 17:18 |
| *** admp has joined #zope3-dev | 17:18 | |
| tarek_ | (the CEST) | 17:19 |
| *** admp has quit IRC | 17:19 | |
| srichter | the pattern should be able to handle this | 17:19 |
| srichter | but how does datetimeparser interpret: 01/01/01 | 17:19 |
| srichter | for example? | 17:19 |
| srichter | this is the problem with guessing | 17:20 |
| tarek_ | oh, | 17:20 |
| srichter | the pattern approach allows you to be deterministic about the date | 17:20 |
| tarek_ | i'll have to look, but running on a real mailbox (+10k mails and a bunch of spams) -> i just had the CEST failure | 17:20 |
| *** MohsenY has joined #zope3-dev | 17:21 | |
| srichter | well, it would not fail | 17:21 |
| tarek_ | yup | 17:21 |
| srichter | but the US starts using MM/DD/YY | 17:21 |
| *** mohsenX has quit IRC | 17:21 | |
| srichter | and in Germany it is DD/MM/YY | 17:21 |
| tarek_ | yeah, but actually it's always US style in mails i think | 17:22 |
| srichter | same goes for 01-01-01 | 17:22 |
| srichter | the US uses it as MM-DD-YY | 17:22 |
| srichter | the internal interpretation is YY-MM-DD | 17:22 |
| * tarek_ is in France == like germany | 17:22 | |
| srichter | yep | 17:24 |
| tarek_ | ok so I delete datetimeutils.py :) | 17:24 |
| srichter | you do not have to, but I would :-) | 17:25 |
| tarek_ | it's gone :) | 17:26 |
| srichter | btw, if you develop a high-level datetime parsing function atop the zope.i18n code, then this is probably something you could contribute to the core | 17:27 |
| srichter | I imagine a lot of people would want this | 17:27 |
| tarek_ | sure | 17:27 |
| philiKON | you mean datetime parsing basing on locale? | 17:27 |
| tarek_ | email is a good test case | 17:27 |
| srichter | btw, eventually I will also support fully localized naming, such as | 17:27 |
| tarek_ | because you get dates from all locals | 17:27 |
| srichter | Lundi, Avril 4, 2005 | 17:28 |
| philiKON | tarek_, do you? doesn't the mime standard define what date format you have to use? | 17:28 |
| philiKON | srichter, i thought we have that already | 17:28 |
| srichter | philiKON: currently it does not use the localized names I think | 17:28 |
| srichter | let me check | 17:28 |
| tarek_ | philiKON: let me check what's fetched from imap | 17:29 |
| srichter | no, it does | 17:29 |
| srichter | you are right | 17:29 |
| philiKON | :) | 17:29 |
| srichter | but, it only supports the names for the current locale | 17:30 |
| srichter | so thi smight be an issue in something like E-mail, because the client might be set to French, but the date is in English; so currently you would have to look up the English locale manually; but maybe this is the right thing to do | 17:31 |
| philiKON | you can get any locale by zope.i18n.locale.getLocale | 17:31 |
| srichter | of course | 17:31 |
| philiKON | i still don't understand the problem with emails | 17:31 |
| philiKON | doesn't the MIME standard define what format the Date: header should be in?!? | 17:31 |
| * srichter thinks he should sound much more authoritative on this subject as he wrote the code | 17:31 | |
| philiKON | hehe | 17:32 |
| tarek_ | philiKON: when you get an email, you get a Date header and juste a Mime version | 17:33 |
| philiKON | right | 17:34 |
| philiKON | and the Date: header is in what date format? ISO? | 17:34 |
| *** MiUlEr has quit IRC | 17:34 | |
| * tarek_ is looking | 17:35 | |
| tarek_ | it can be in several shapes indeed | 17:35 |
| philiKON | sucks | 17:36 |
| *** sashav has quit IRC | 17:37 | |
| * tarek_ is comparing python/email/tests/test_email.py cases with his real cases | 17:37 | |
| tarek_ | over 10k mails i had a limited number of patterns in fact | 17:39 |
| tarek_ | Wed,3 Apr 2002 14:58:26 +0800 : 99% of mails | 17:39 |
| tarek_ | 3 Apr 2002 14:58:26 +0800 : 0.9 % of mails | 17:40 |
| tarek_ | Wed,3 Apr 2002 14:58:26 +08000 (CEST) : spams,and buggdy mails | 17:40 |
| tarek_ | but all are in english | 17:40 |
| srichter | that should be easy for a pattern parser as you have only 3 effective patterns | 17:42 |
| tarek_ | yup | 17:42 |
| srichter | and since the last one could be ambiguous, I would suggest clipping off the (xxx) before sending it to the parser | 17:42 |
| tarek_ | that what i did with DateTimeParser yes | 17:43 |
| srichter | so I think you are in good shape of using zope.i18n | 17:43 |
| tarek_ | yup :) | 17:44 |
| tarek_ | thanks for the help srichter, philiKON, bska|mobile | 17:44 |
| regebro | A note: I think the fact that parsing incorrect date-formats fails is good. It sorts out a lot of spam. | 17:46 |
| srichter | :-) | 17:47 |
| regebro | And on a connected topic: Any *sorting* should be done on the date the server *received* the mail, as you otherwise lose mails from people who have the wrong date set on their computer. | 17:48 |
| tarek_ | regebro: yes indeed, they all get 01/01/1970 and that's a good sorting | 17:48 |
| regebro | But, you still need to display the send-dat, of course. | 17:48 |
| tarek_ | but for instance regebro, all our mailing lists are adding the (CEST) stuff | 17:49 |
| tarek_ | i mean | 17:49 |
| tarek_ | all our CVS things | 17:49 |
| regebro | Hmmm. I don't remember the specs, but doesn't that break them? | 17:50 |
| *** tvon has quit IRC | 17:51 | |
| tarek_ | yes it does | 17:51 |
| *** tvon has joined #zope3-dev | 17:52 | |
| tarek_ | but thunderbird eat them so i have to :) | 17:52 |
| *** mohsen has quit IRC | 17:53 | |
| regebro | Well, that should be an easy fix of the CVS mails in that case: Don't add the date header. Most sendmails and qmails will add them (correctly) if they are missing. | 17:53 |
| regebro | good point | 17:53 |
| *** MohsenY has quit IRC | 17:56 | |
| *** mooded has quit IRC | 17:58 | |
| *** viyyer has quit IRC | 18:05 | |
| *** Theuni has quit IRC | 18:07 | |
| *** viyyer has joined #zope3-dev | 18:10 | |
| *** viyyer has quit IRC | 18:13 | |
| *** gintas has joined #zope3-dev | 18:15 | |
| *** admp has joined #zope3-dev | 18:29 | |
| *** SteveA has quit IRC | 18:36 | |
| *** SteveA has joined #zope3-dev | 18:37 | |
| bska|mobile | srichter: looking a zope.i18n.locales data/en.xml it shows the pattern for 'long' as h:mm:ss a z | 18:46 |
| bska|mobile | I thought the 'a' would represent am/pm | 18:47 |
| bska|mobile | but it doesn't seem to | 18:47 |
| srichter | really? | 18:47 |
| srichter | that would surprise me | 18:47 |
| bska|mobile | that is what its supposed to do? | 18:48 |
| srichter | I am looking at the docks | 18:48 |
| bska|mobile | 08:00:00 +000 is what it renders | 18:48 |
| srichter | a should be the am/pm marker based on the interface | 18:49 |
| srichter | oh, the am/pm marker of the locale you chose might be empty? | 18:49 |
| bska|mobile | hrm, maybe | 18:50 |
| bska|mobile | its the request locale from my browser, I'll check | 18:50 |
| srichter | mmh, it sdhould have it | 18:50 |
| srichter | can you reproduce the problem in a test? | 18:51 |
| bska|mobile | I'll try, let you know when I do | 18:51 |
| bska|mobile | thanks | 18:51 |
| srichter | the code clearly has:" | 18:52 |
| srichter | # am/pm marker (Text) | 18:52 |
| srichter | for entry in _findFormattingCharacterInPattern('a', pattern): | 18:52 |
| srichter | info[entry] = ampm | 18:52 |
| *** ignas has quit IRC | 18:53 | |
| srichter | which means that any pattern part containing any amount of 'a' should be the ampm marker | 18:53 |
| srichter | btwm I also have plenty of tests with the am/pm marker: testFormatSimpleHourRepresentation | 18:55 |
| *** hazmat has quit IRC | 19:11 | |
| *** stub has quit IRC | 19:20 | |
| *** lunatik has left #zope3-dev | 19:29 | |
| *** tarek_ has quit IRC | 19:43 | |
| *** mohsen has joined #zope3-dev | 19:43 | |
| *** hazmat has joined #zope3-dev | 19:50 | |
| *** admp has quit IRC | 19:55 | |
| *** FarcePest has quit IRC | 20:00 | |
| *** mohsen has quit IRC | 20:15 | |
| *** regebro has quit IRC | 20:19 | |
| *** gintas has quit IRC | 20:24 | |
| *** AJC has joined #zope3-dev | 20:49 | |
| *** efge has left #zope3-dev | 20:51 | |
| *** mkerrin has quit IRC | 20:53 | |
| *** Damascene has quit IRC | 20:56 | |
| *** Damascene has joined #zope3-dev | 20:57 | |
| *** faassen has left #zope3-dev | 21:01 | |
| *** hazmat has quit IRC | 21:06 | |
| *** admp has joined #zope3-dev | 21:20 | |
| *** admp has quit IRC | 21:22 | |
| AJC | where can i find an example of querying the date of an object from the dublin core? | 21:29 |
| *** Arnia has joined #zope3-dev | 21:33 | |
| *** RaFromBRC has joined #zope3-dev | 21:34 | |
| *** gintas has joined #zope3-dev | 21:37 | |
| *** projekt01 has joined #zope3-dev | 21:43 | |
| *** Aiste has quit IRC | 22:16 | |
| srichter | AJC: I think I cover this in my book | 22:29 |
| srichter | but basically it is | 22:29 |
| srichter | dc = IDublinCore(obj) | 22:29 |
| srichter | dc.modified | 22:29 |
| AJC | ah, cool. what's the title of your book? :-) | 22:36 |
| AJC | thanks | 22:36 |
| srichter | AJC: http://www.amazon.com/exec/obidos/tg/detail/-/0672326175/qid=1112729959/102-1924041-1426553 | 22:39 |
| srichter | Zope 3 Developer's Handbook | 22:40 |
| AJC | nice review ;) | 22:42 |
| srichter | yeah, garrett was very nice :-) | 22:42 |
| *** tvon has quit IRC | 22:54 | |
| *** alga has quit IRC | 22:57 | |
| *** andrew_m has quit IRC | 23:03 | |
| *** AJC has quit IRC | 23:31 | |
| *** Arnia has left #zope3-dev | 23:42 | |
| *** mohsen has joined #zope3-dev | 23:53 | |
Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!