python - Django How to find out if earlier than 7pm in a specific timezone -


I am new to Django / programming and am trying to write some code that will tell me whether it should be from 7 o'clock First is a specific time zone (I provide timezone).

If this type of question has been said a lot then I am sorry. I searched an answer but did not come up with the solution

I appreciate time and expertise.

I found a solution that works:

  tz = Timezone ('US / Eastern') datetime.now (Timezone (tz)). Hour & lt; 19    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -