AndyTheFactory / delphichromiumembedded

Automatically exported from code.google.com/p/delphichromiumembedded
0 stars 0 forks source link

TzSpecificLocalTimeToSystemTime is not supported by Windows 2000 #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
External function declared in ceflib "TzSpecificLocalTimeToSystemTime" is not 
supported by Windows 2000, so therefor "EOSError" will appear after running 
application exe.

Workaround is to comment external function declaration and use own function 
like this one:

function DateTimeToCefTime(dt: TDateTime): TCefTime;
var st1, st2: TSystemTime;
    tz: TTimeZoneInformation;
begin
  GetTimeZoneInformation(tz);
  tz.Bias := -tz.Bias;
  tz.StandardBias := -tz.StandardBias;
  tz.DaylightBias := -tz.DaylightBias;
  DateTimeToSystemTime(dt, st1);
  SystemTimeToTzSpecificLocalTime(@tz, @st1, @st2);
  Result := SystemTimeToCefTime(st2);
end;

Original issue reported on code.google.com by ilga...@gmail.com on 21 Sep 2011 at 9:08

GoogleCodeExporter commented 9 years ago
Good! tnks

Original comment by w.spini...@gmail.com on 29 Oct 2014 at 4:56