-1

Complete Newbie Here.

I have three offices with the main one on the west coast. Must compare east coast time to west coast and also Europe office to determine if each one is open according to west coast time. Supposed to use datetime and version 2.7. I dont understand how to get started or enter the time and to compare if they are open or not.

matisetorm
  • 857
  • 8
  • 21
  • 1
    Welcome to SO. Please take the time to read [ask]. A good place to start would be [the Tutorial](https://docs.python.org/3/tutorial/index.html). [Datetime](https://docs.python.org/3/library/datetime.html) – wwii Dec 27 '17 at 02:21

2 Answers2

0

I think I am a little confused about your question. What information do you have? It sounds like all you have is

  1. locations of each office
    • do you know the timezones of these offices?
  2. and a computer with python 2, which is currently at one of the offices.

So a big question is, what kind of answer are you looking for? If you want to input an time that West Coast office is open and see if the other two offices are open at that time, simply figure out the timezones, figure out the hour difference they are from the West coast office, add those differences to your current time, then check if that's open or closed. Of course those have their own difficulties with data representation, but the logic is simple enough.

Is that what you are looking for?

Also, another factor could be if offices have different time schedules on different days. If so you have to take into account the day of the week.

jsolum
  • 196
  • 2
  • 15
0

Yes this is what I'm looking for. I can figure current time on west coast, but then I need to compare that time to current time in lets say New York to see if they are open (9am - 5pm) for West Coast, then do the same with time in Europe. Ive read some docs that say convert the times to proper time zone last, which is totally confusing. Does this make sense? Ultimately I need to test to see if NewYork and Europe are open during west coast time and print yes they are open or no they are closed.