That is not a solution that works with all timezones. A number of timezones have 30 minute offsets.
Venezuela <http://news.bbc.co.uk/2/hi/americas/7134927.stm> is a recent glaring example. In the free world, Australia has a number of 30 minute offset timezones. Norfolk Island and Newfoundland also have 30 minute offsets <http://www.timeanddate.com/library/abbreviations/timezones/> . Best regards, Kevin G. McCoy --- In [email protected], "Peter Luijer" <p.lui...@...> wrote: > > You could just as well use the "IncHour"-function from the DateUtils unit :) > > ================================================== > Unit > DateUtils > > Category > date/time routines > > function IncHour(const AValue: TDateTime; const ANumberOfHours: Int64 = 1): > TDateTime; > > Description > IncHour returns the value of the AValue parameter, incremented by > ANumberOfHours hours. ANumberOfHours can be negative, to return a date and > time N hours prior to AValue. > > ================================================== > > Greetz, > > Peter. > ________________________________________ > From: [email protected] [mailto:[email protected]] On Behalf > Of Glenn B. Lawler > Sent: vrijdag 6 augustus 2010 1:08 > To: [email protected] > Subject: RE: [delphi-en] Re: Converting local to UTC time > > > > Subtracting 8 from Pacific time would result in the same time, but 8 > *days* before! > > Quite right. What I had in mind, but failed to include explicitly, was > something like this: > > UTC_Time:=MyTime - (EncodeTime(1,0,0,0) * MyOffset); > > LocalTime:=UTC_Time + (EncodeTime(1,0,0,0) * MyOffset); > > Glenn Lawler > www.incodesystems.com > [Non-text portions of this message have been removed]

