Hello everybody,
I am writing a blog app where I am syncing my magnolia links to
my weblog. I am using the magnolia API for this. In my link model I
have a 'add_date' field to sync the created time of the magnolia
link.
In the syncing function I am using
add_date = datetime(*(time.strptime(link("created").rstrip("-07:00"),
"%Y-%m-%dT%H:%M:%S")[0:6]))
to sync the 'created' time of the link. But when I try to sync the
script it synced 17 links and
failed in the 18th link.
File "path/to/myproject/apps/links/models.py", line 79, in
sync_magnolia_links
add_date =
datetime(*(time.strptime(link("created").rstrip("-07:00"), "%Y-%m-%dT
%H:%M:%S")[0:6]))
File "/usr/local/lib/python2.5/_strptime.py", line 331, in strptime
(data_string, format))
ValueError: time data did not match format: data=2008-03-30T22:43
fmt=%Y-%m-%dT%H:%M:%S
We can observe that my 18th link has timestamp of T22:43 where the
seconds are missing. Can anyone suggest me a way yo bypass that
problem..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---