InternetTimeToDateTime function
Date/Time routines
Return to Introduction  Previous page  Next page
Unit
acUtils  

Declaration
function InternetTimeToDateTime(InternetTime: String): TDateTime;  

Description
The InternetTimeToDateTime function converts the string representation of date time to the TDateTime variable.  
 
The InternetTime parameter is the string representation of the date/time returned by Internet servers in following maner:  
day_of_week, day month year hour:min:sec offset  
for example:  
Sat, 19 Oct 2002 19:45:16 GMT, or Fri, 23 Feb 1999 6:02:37 GMT+2  
 
The function will convert this string to the local time, accordingly to GMT offset (specified in the string) between client and server, and the daylight bias on local machine.  
 
iiinfo This function used in acHTTP component, when it preparing the parameters for the OnHeaderInfo event handler. It convert the date values from the header of HTTP response to the Delphi-friendly TDateTime values.  

See also
StrToDateTimeDef function;  
GMTToLocalTime and LocalTimeToGMT functions.