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

