You asked about:
"3:30 pm in San Francisco and 7:30 pm in Dubai"
If all you know is time and location, then you have a problem because not all time zones are fixed objects. Dubai is fixed at UTC + 4, but San Francisco alternates between UTC-8 for Pacific Standard Time and UTC-7 for Pacific Daylight Time. Therefore, a date is required for this conversion.
The following is the difference using the current date in the first time zone:
TimeZoneInfo tz1 = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"); TimeZoneInfo tz2 = TimeZoneInfo.FindSystemTimeZoneById("Arabian Standard Time"); DateTime today = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, tz1).Date; DateTime dt1 = new DateTime(today.Year, today.Month, today.Day, 15, 30, 0); // 3:30 PM DateTime dt2 = new DateTime(today.Year, today.Month, today.Day, 19, 30, 0); // 7:30 PM TimeSpan elapsed = TimeZoneInfo.ConvertTimeToUtc(dt1, tz1) - TimeZoneInfo.ConvertTimeToUtc(dt2, tz2);
(Note that the "Pacific Standard Time" identifier is the Windows time zone identifier for the US Pacific and, despite the name, covers both PST and PDT.)
But even this is not necessarily the best approach, because today is not the same in all time zones. At (almost) any point in time, two different days are active throughout the world. This Wikipedia illustration demonstrates this well.

It is possible that the βcurrentβ date for the time zone of the source does not match the current date in the end time zone. Without additional input, you are unlikely to be able to do this. You must know the date in question for each value.
source share