Unable to edit blogger posts where post time has been modified
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BloGTK |
Fix Committed
|
Undecided
|
JayReding |
Bug Description
Using BloGTK development version (trunk checked out at approximately 4pm GMT on Monday Nov 16th)...
I have some previous posts I'm unable to edit on my blog, these are posts where I have manually specified the publication time. This is done in blogger for one reason or another, but most commonly for scheduled posting where you can write a post in advance and have it published at a given time in the future.
In these instances I've noticed the downloaded cache contains entries such as:
This leads to the following trace in BloGTK:
Traceback (most recent call last):
File "./bin/
post_datestamp = time.strptime(
File "/usr/lib/
return _strptime(
File "/usr/lib/
(data_string, format))
ValueError: time data '20090326T11:' does not match format '%Y%m%dT%H:%M:%S'
I can confirm that if I manually hack the cache entries to each read 20090326T11:00:00 then all works as expected.
Related branches
- JayReding: Approve
Changed in blogtk: | |
assignee: | nobody → JayReding (jayreding) |
Changed in blogtk: | |
status: | New → Fix Committed |
I should have mentioned this is a blogger blog.
Investigating further I can see the expected returned timestamp would look like: 07-22T21: 08:00.001+ 01:00
2009-
In the cases where BloGTK is failing the returned timestamp looks like: 03-26T11: 41:00.001Z
2009-
So one way to fix appears to be to change line 58 in bloggeratom.py from .text[: -10].replace( '-', '') .text[: 19].replace( '-', '')
postdate = entry.published
to
postdate = entry.published
i.e. instead of chopping of the bits you don't want from the end of the string, just keep the bits you do want from the beginning.