I have some code for integrating vCalendar files (.ics) into a database. A problem recently arose when a file received on 4th October and which contained an appointment for 30th October was integrated into the database at the wrong time. The appointment was for 10am but was added at 11am because on 4th October we were in BST (British Summer Time) and 30th October is not.
The ics file didn't contain any timezone information and so my app used UTC as the basis for the time of the appointment (times in .ics files are based on UTC). It then got the UTC of local time on the machine with the database and adjusted the appointment time accordingly. I can see now that it's wrong because instead of using local time on the machine it should be using local time as it will be on the 30th October on the machine.
Is it possible to return local time as it will be on a future date?
- Andy
___________________________________________________________________
If a man speaks in a forest and there are no women around to hear him - will he still be wrong?
The ics file didn't contain any timezone information and so my app used UTC as the basis for the time of the appointment (times in .ics files are based on UTC). It then got the UTC of local time on the machine with the database and adjusted the appointment time accordingly. I can see now that it's wrong because instead of using local time on the machine it should be using local time as it will be on the 30th October on the machine.
Is it possible to return local time as it will be on a future date?
- Andy
___________________________________________________________________
If a man speaks in a forest and there are no women around to hear him - will he still be wrong?