Re: A little flaw in weblogger

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: A little flaw in weblogger

Mark A. Hershberger
(Ccing emacsweblogs)

"[hidden email]" <[hidden email]> writes:

> When I fetch a entry, edit it, and publish it.  I got an error of date
> format.  I believe it because I'm a chinese and the data fetched from my
> blog contains a different format other than DD-MM-YYYY, but "2010年03月10日
> 11:11",  Will it be fixed?  Or just ignore the format check?

The fault here is with Emacs or (on older Emacs) xml-rpc.el.

I'm sure you're aware that Emacs does not have good localization (l10n) and
internationalization (i18n) support.  xml-rpc.el uses an Emacs function
to parse the date string.

Currently timezone-parse-date (the function at fault here) understands
the following formats:

 (1) 14 Apr 89 03:20[:12] [GMT]
 (2) Fri, 17 Mar 89 4:01[:33] [GMT]
 (3) Mon Jan 16 16:12[:37] [GMT] 1989
 (4) 6 May 1992 1641-JST (Wednesday)
 (5) 22-AUG-1993 10:59:12.82
 (6) Thu, 11 Apr 16:17:12 91 [MET]
 (7) Mon, 6  Jul 16:47:20 T 1992 [MET]
 (8) 1996-06-24 21:13:12 [GMT]
 (9) 1996-06-24 21:13-ZONE
 (10) 19960624T211312

It looks like it wouldn't be too hard to add support for the format.
But I need better documentation for it.  Do you know the name of the
date format or where the format is described? What software does your
weblog use?  If you don't know, maybe you can give me the URL?

Finally, it may help if you subscribe to the emacsweblogs mailing list
http://lists.nongnu.org/mailman/listinfo/emacsweblogs

Other users are there and discussion like this is something that others
might benefit from.

Thanks,

Mark.

--
http://hexmode.com/

The world is a dangerous place, not because of those who do evil, but
because of those who look on and do nothing.
                                            — Albert Einstein


_______________________________________________
Emacsweblogs mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacsweblogs
Reply | Threaded
Open this post in threaded view
|

Re: A little flaw in weblogger

biAji-2
2010/3/11 Mark A. Hershberger <[hidden email]>:

> (Ccing emacsweblogs)
>
> "[hidden email]" <[hidden email]> writes:
>
>> When I fetch a entry, edit it, and publish it.  I got an error of date
>> format.  I believe it because I'm a chinese and the data fetched from my
>> blog contains a different format other than DD-MM-YYYY, but "2010年03月10日
>> 11:11",  Will it be fixed?  Or just ignore the format check?
>
> The fault here is with Emacs or (on older Emacs) xml-rpc.el.
>
> I'm sure you're aware that Emacs does not have good localization (l10n) and
> internationalization (i18n) support.  xml-rpc.el uses an Emacs function
> to parse the date string.
>
> Currently timezone-parse-date (the function at fault here) understands
> the following formats:
>
>  (1) 14 Apr 89 03:20[:12] [GMT]
>  (2) Fri, 17 Mar 89 4:01[:33] [GMT]
>  (3) Mon Jan 16 16:12[:37] [GMT] 1989
>  (4) 6 May 1992 1641-JST (Wednesday)
>  (5) 22-AUG-1993 10:59:12.82
>  (6) Thu, 11 Apr 16:17:12 91 [MET]
>  (7) Mon, 6  Jul 16:47:20 T 1992 [MET]
>  (8) 1996-06-24 21:13:12 [GMT]
>  (9) 1996-06-24 21:13-ZONE
>  (10) 19960624T211312
>
> It looks like it wouldn't be too hard to add support for the format.
> But I need better documentation for it.  Do you know the name of the
> date format or where the format is described? What software does your
> weblog use?  If you don't know, maybe you can give me the URL?

Oh, my.  I forgot to check the xml-rpc.el. My weblog using wordpress
and the url is http://www.biaji.net/wp/

I don't know why, emacs parse the date to this "Date: 10  3月 2010
19:11:47 +0800" and the date I see in webpage is "2010年03月10日 11:11"

What should I do to help next?

And, thanks for your quick reply!  Wish you a nice day!




>
> Finally, it may help if you subscribe to the emacsweblogs mailing list
> http://lists.nongnu.org/mailman/listinfo/emacsweblogs






>
> Other users are there and discussion like this is something that others
> might benefit from.
>
> Thanks,
>
> Mark.
>
> --
> http://hexmode.com/
>
> The world is a dangerous place, not because of those who do evil, but
> because of those who look on and do nothing.
>                                            -- Albert Einstein
>


_______________________________________________
Emacsweblogs mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacsweblogs
Reply | Threaded
Open this post in threaded view
|

Re: A little flaw in weblogger

Mark A. Hershberger
biAji <[hidden email]> writes:

> I don't know why, emacs parse the date to this "Date: 10  3月 2010
> 19:11:47 +0800" and the date I see in webpage is "2010年03月10日 11:11"

I can't even get Emacs to parse it like that.  So you're ahead of me.

> What should I do to help next?

I spent a few minutes looking at the WordPress source code and the only
way I can see it returning something like that would bee if you have a
plugin installed that applies an xmlrpc_method filter.  Otherwise,
WordPress should return ISO-format dates.

So, the next thing to do is make sure you have the latest xml-rpc.el
(https://launchpad.net/xml-rpc-el) and then set xml-rpc-debug to 10.
You can evaluate the following sexp for that:  (setq xml-rpc-debug 10)

Then, get weblogger.el to cause the error again.  After that, email me
a copy of any buffers that start with “response-data” or “ *http
www.biaji.net:80*”.  They'll contain whatever the server's sending back
to you.

Another thing that would help is a list of any plugins you have
installed with Wordpress and their version.

After that, I should be able to tell you where the problem is.

Mark.

--
http://hexmode.com/

The world is a dangerous place, not because of those who do evil, but
because of those who look on and do nothing.
                                            — Albert Einstein


_______________________________________________
Emacsweblogs mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/emacsweblogs