Вниз
Скачать: CL | DM;

Как поменять время ?   Найти похожие ветки 

← →
Morg   (2004-02-29 19:52) [0]

Этот код меняет время и дату, а как синхронизировать что-то одно.

function SetPCSystemTime(tDati: TDateTime): Boolean;
var
 tSetDati: TDateTime;
 vDatiBias: Variant;
 tTZI: TTimeZoneInformation;
 tST: TSystemTime;
begin
 GetTimeZoneInformation(tTZI);
 vDatiBias := tTZI.Bias / 1440;
 tSetDati := tDati + vDatiBias;
 with tST do
 begin
   wYear := StrToInt(FormatDateTime("yyyy", tSetDati));
   wMonth := StrToInt(FormatDateTime("mm", tSetDati));
   wDay := StrToInt(FormatDateTime("dd", tSetDati));
   wHour := StrToInt(FormatDateTime("hh", tSetDati));
   wMinute := StrToInt(FormatDateTime("nn", tSetDati));
   wSecond := StrToInt(FormatDateTime("ss", tSetDati));
   wMilliseconds := 0;
 end;
 SetPCSystemTime := SetSystemTime(tST);
end;


P.S. знаю что ламер Ж)


← →
Novichok   (2004-02-29 20:03) [1]


SetPCSystemTime(date+strtotime("19:01:33"));


Дату он меняет на ту же самую, а время на то что в скобках :)


← →
Morg   (2004-02-29 20:03) [2]

спасибо



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.025 c
3-1080788521
Badboy
2004-04-01 07:02
2004.04.25
Добавление


3-1080725353
JibSkeart
2004-03-31 13:29
2004.04.25
Интерестно а можно узнать в ADOConnection у какого обьекта ...


3-1080134024
Dimedrol
2004-03-24 16:13
2004.04.25
IB/FB компоненты, скорость работы


7-1077634845
Rentgen
2004-02-24 18:00
2004.04.25
WDM


3-1080289986
russko
2004-03-26 11:33
2004.04.25
Ошибка: Query1:Field" is of an unknown type




   Наверх