I guess what I am beginning to realize is that everytime I call my
mydatetime = getHubIndexUpdateDate(0), I get a new
tz.FixedOffsetTimezone object at xxxx, noting the xxxx.

Maybe this is what is messing pickle up since it is complaining that
its not the same object.  I tried changing the
getHubIndexUpdateDate(0)
function to return datetime.ctime() instead of the datetime object.
So, far I have not had the pickling error.  I have not tried to edit a
record yet,
though to see if that works.  I guess the dissadvantage is the result
of ctime
is a text string that does not contain time zone info.

Thanks to all as it is slowly dawning on me what is going on.  Let me
know
if I am on the right track.


On Apr 6, 3:30 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 4/6/07, paceman <[EMAIL PROTECTED]> wrote:
>
> > Next I tried it with cPickle:
> ...
> > >>> mydatetime
> > datetime.datetime(2007, 3, 3, 10, 51, 36,
> > tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0xb7781f4c>)
> > >>> import cPickle
> > >>> cPickle.dumps(mydatetime)
> > "cdatetime\ndatetime\np1\n(S'\\x07\\xd7\\x03\\x03\\n3$\\x00\\x00\
>
> ...
>
> I think that as long as the datetime's tzinfo is from psycopg2, it'll
> work, since that tzinfo was specifically written to be pickle-able.
>
> Why don't you check your codebase (including SQLAlchemy) to see if
> tzinfo is being assigned to some other type under other circumstances.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to