Regardless of what the user’s local time zone is set to, using Delphi 2007, I need to determine the time (TDateTime) in the Eastern time zone.
How can I do that? Of course, needs to be daylight savings time aware.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
TDateTime does not have any time zone information (it is just a double – date as whole number, time as decimal), so you would need that separately. You would need your own logic for DST as well, I don’t believe there is any in Delphi. Then use the IncHour function in DateUtils.pas to alter the TDateTime to the Eastern Timezone.
There are probably web services that will do this for you. Does your application need to be self contained, or can it connect to the web to do it?