If I capture datetime.now as startTime, allow some time to pass, then use datetime.now as endTime their difference gives an accurate elapsed time.
But I'm wondering about the scenario where the phone is traveling, and the startTime occurs in one timezone, but endTime occurs in an adjacent timezone. if I use the difference between startTime and endTime (as described above), could I have a potential inaccuracy due to timezone?
Looking at some other threads I saw the line of code below(from Klaus):
dt = DateTime.DateParse(DateTime.Date(DateTime.Now))
If I use:
lngStartTime=DateTime.DateParse(DateTime.Date(DateTime.Now))
lngEndTime=DateTime.DateParse(DateTime.Date(DateTime.Now))
with lngEndTime in a different timezone from lngStartTime, would the difference between these two always give me a correct elapsed time regardless of timezone?
But I'm wondering about the scenario where the phone is traveling, and the startTime occurs in one timezone, but endTime occurs in an adjacent timezone. if I use the difference between startTime and endTime (as described above), could I have a potential inaccuracy due to timezone?
Looking at some other threads I saw the line of code below(from Klaus):
dt = DateTime.DateParse(DateTime.Date(DateTime.Now))
If I use:
lngStartTime=DateTime.DateParse(DateTime.Date(DateTime.Now))
lngEndTime=DateTime.DateParse(DateTime.Date(DateTime.Now))
with lngEndTime in a different timezone from lngStartTime, would the difference between these two always give me a correct elapsed time regardless of timezone?