On Fri, 2006-08-11 at 04:43 -0700, PythonistL wrote: > Im my template tag I use something like this > > > if resolve_variable(EndTime, context)>datetime.datetime.now(): > ... > ... > ... > where in a table > EndTime is 2006-08-10 12:56:00 > and say datetime.datetime.now() is about > datetime.datetime(2006, 8, 11, 13, 35, 14, 312000) > > from that said above, should be > resolve_variable(EndTime, context)>datetime.datetime.now(): > False? I would say YES. > > But in my template tag it is calculated as True. > > In my template tag > resolve_variable(EndTime, context)-datetime.datetime.now() is > calculated to be > 23:20:40.422000
What is the value and type of resolve_variable(EndTime, context)? Inside the template tag, not when you try at the command line or anything. At the point where the error occurs. Somehow it's dropping the -2 days portion. I'm going to assume that Python's datetime library is continuing to work sensible, which makes me think that the result of resolve_variable is not what you are expecting. This doesn't solve the problem, but it might help shed some light on what is going on. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---