Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8685213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:30:31+00:00 2026-06-12T22:30:31+00:00

I am having a weird problem. I am running a django app and in

  • 0

I am having a weird problem.

I am running a django app and in one of my models I have a method to compare the time that the user gives and the time that is stored in the model db

So, for debugging purposes, I do this.

print self.start
print start
print self.start.time < start.time

And the output is:

2012-10-15 01:00:00+00:00
2012-10-22 01:01:00+00:00
False

HOW IS THIS POSSIBLE?!?!?!

I tried this in the django shell and in the python cli! Both give me True! With the same values.

Thanks guys.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:30:32+00:00Added an answer on June 12, 2026 at 10:30 pm

    .time is a method, not a property.

    >>> import datetime
    >>> a = datetime.datetime(2012, 10, 15, 1, 0, 0)
    >>> a.time
    <built-in method time of datetime.datetime object at 0x10049f508>
    >>> a.time()
    datetime.time(1, 0)
    

    Therefore, the correct code would be if self.start.time() < start.time().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using django with app-engine-patch and I'm having this wierd problem running manage.py dumpdata
I'm having a weird problem with index organized table. I'm running Oracle 11g standard.
I'm having the weird problem that after having javascript inject some dom-elements the css-rules
I'm having a weird problem with memset, that was something to do with a
I am having a weird problem that I hope you can help me with.
I am having a weird problem with PHP's DateTime diff method. I've been using
Having a weird issue. I'm new to Macs and have a windows VM that
Having a weird problem here. Everybody knows that if you use web.config's customErrors section
I am getting a weird problem while running one procedure . Proc is like
I'm having a really weird problem with the iPad app I'm writing. On startup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.