title: Find day from given date in python
body: <p>Hello friends I have written two methods in python which returns the day according to the date passed to them but however the output I am getting is different in some cases.
  Pasting my code below please have a look at it and suggest me corrections....</p>
  
  <p>e.g. for date  "10/06/2014" (m/d/yy) one function returns output as Monday which is correct and another returns it as Sunday which is not.
  I am using Odoo8 (Openerp) server's method in one case and Python's method in other.</p>
  
  <pre><code>def a():
      month, day, year = (int(x) for x in "10/06/2014".split('/'))
      ans = datetime.date(year, month, day)
      day_name = ans.strftime("%A")    # the day_name is Monday here
  
  
  def b():
      dt = datetime.strptime("10/06/2014", "%m/%d/%y")
      dt = fields.Datetime.context_timestamp(self, dt)   # openerp's ORM method 
      t = dt.strftime("%A")        # the day_name is Sunday here
  </code></pre>