Good Morning!
Look for GpTimeZone.
Primoz Gabrijelcic's Time Zone Routines v1.2<p>
Date/Time Routines to enhance your 32-bit Delphi Programming. <p>
(c) 1999, 2000 Primoz Gabrijelcic<p>
=================================================== <p>
These routines are used by ESB Consultancy and Primoz Gabrijelcic
within the development of their Customised Application. <p>
Primoz Gabrijelcic retains full copyright. <p>
mailto:[email protected]
http://17slon.com/gp/gp/
http://www.eccentrica.org/gabr/gp/
http://members.xoom.com/primozg/gp/
Primoz Gabrijelcic grants users of this code royalty free rights
to do with this code as they wish. <p>
Primoz Gabrijelcic makes no guarantees nor excepts any liabilities
due to the use of these routines. <p>
The procedure GetTZNowUTCAndBias may give you what you need. If not, then check
out the rest of the methods.
HTH...Dan'l
____________________________________
Every day with Jesus is a Great! day
and He loves YOU!
----- Original Message ----
From: mauro russo <[email protected]>
To: delphi-en <[email protected]>
Sent: Tue, October 27, 2009 4:48:28 AM
Subject: [delphi-en] conversions between UTC and local time
Dear all,
I am using the following function in order to obtain the bias between local
time and UTC:
function GetTimeZoneBias_min(): Integer;
var tz: TTimeZoneInformation;
begin
case GetTimeZoneInformation(tz) of
TIME_ZONE_ID_STANDARD: Result := -(tz.StandardBias + tz.Bias);
TIME_ZONE_ID_DAYLIGHT: Result := -(tz.DaylightBias + tz.Bias);
else
Result := 0;
end;
end;
and I use the result Res in the formula: locla_time = UTC + Res.
Now, I would like to obtain the bias not at the current time, but according to
a given UTC value.
For example, now UTC is 9:47 at the 27th of october,
but how to obtain the bias when UTC was, for example, 8:35 at the 5th of july?
How to do it?
Regards and thanks for help.
----------
Questa email รจ stata verificata dal sistema centralizzato antivirus della
UniPlan Software
[Non-text portions of this message have been removed]
------------------------------------
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [email protected]! Groups Links