how to book an online meeting (video call) between different time zones?

92 Views Asked by At

I'm trying to use NetBeans to set up a meeting between 2 people where the users input their name & location as well as their availabilities to call on specified days of the week where the program outputs the possible times to call to each user in their respective time zones.

I started creating the Person & Scheduler classes on BlueJ and attempted to convert the hours to minutes and output the times but I'm having trouble with the timezones and using NetBeans.

1

There are 1 best solutions below

0
On BEST ANSWER

When dealing with different time zones in the future (i.e. the rules for calculating the final time may change) you can take the following strategy:

Save the time that the meeting organizer selects using the local time zone. This is permanent. The first time, and every time the time zone rules changes (does not happen that often in most countries) you: Convert the meeting time to UTC. For each meeting participant you convert the time to the persons local time zone.

Only use standard library methods for this. Do not try to do any time math yourself, because most people in the World would make a mistake.

In Java use the new Time and Date API if at all possible. That is do not use the Date but use Instant, ZonedDateTime etc. The new API has much less errors and makes it harder to make some yourself. Time and time zones is a place where mistakes are very easily made.