title: Python - Get TimeZone aware First, Last day of the week based on today
body: <p>I want to get first, last day of the week based on users current timezone. i am trying to solve but i could not find a way move forward to solve in python.here i have taken two diff timezones for example.  </p>
  
  <pre><code>from datetime import datetime, date, timedelta
  from pytz import timezone
  
  tz1 = timezone('utc')
  tz2 = timezone('Asia/Kolkata')
  tz3 = timezone('America/Los_Angeles')
  
  dt1 = datetime.now(tz=tz1)
  dt2 = datetime.now(tz=tz2)
  dt3 = datetime.now(tz=tz3)
  
  
  start_of_week = dt1+timedelta(days=0-dt1.weekday())
  end_of_week = dt1+timedelta(days=6-dt1.weekday())
  
  print(start_of_week)
  print(end_of_week)
  
  start_of_week2 = dt2+timedelta(days=0-dt2.weekday())
  end_of_week2 = dt2+timedelta(days=6-dt2.weekday())
  
  print(start_of_week2)
  print(end_of_week2)
  
  
  start_of_week3 = dt3+timedelta(days=0-dt3.weekday())
  end_of_week3 = dt3+timedelta(days=6-dt3.weekday())
  
  print(start_of_week3)
  print(end_of_week3)
  </code></pre>
  
  <p>Output: </p>
  
  <pre><code>2017-10-02 09:21:32.666920+00:00
  2017-10-08 09:21:32.666920+00:00
  2017-10-02 14:51:32.666920+05:30 # not right
  2017-10-08 14:51:32.666920+05:30 # not right
  2017-10-02 02:21:32.666920-07:00 # not right
  2017-10-08 02:21:32.666920-07:00 # not right
  </code></pre>
  
  <p>I live in <code>Asia/kolkata</code> and start of the week <code>Oct 01 (Sunday)</code> and end of the week <code>Oct 07 (Saturday)</code>, what is wrong here?</p>