Caro Marcelo,
Isso � perfeitamente poss�vel, n�o s� atrav�s do CTD1.5 mas como tamb�m
atrav�s de qualquer linguagem onde se possa chamar fun��es da API do
Windows.
Fa�a assim:
External Functions
Library: KERNEL32.DLL
!!CB!! 145
Function: SetSystemTime
Description: bOk = SetSystemTime ( nAno, nMes, nDiaDaSemana, nDia, nHora,
nMinutos, nSegundos, nMilisegundos )
Export Ordinal: 0
Returns
Boolean: BOOL
Parameters
structPointer
Number: WORD
Number: WORD
Number: WORD
Number: WORD
Number: WORD
Number: WORD
Number: WORD
Number: WORD
E depois � s� utilizar....
Em todo caso .... olhe a documenta��o da MS sobre a fun��o SetSystemTime e
sobre a estrutura dos par�metros...
um abra�o,
Lairton.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--
SetSystemTime
The SetSystemTime function sets the current system time and date. The system
time is expressed in Coordinated Universal Time (UTC).
BOOL SetSystemTime(
CONST SYSTEMTIME *lpSystemTime // system time
);
Parameters
lpSystemTime
[in] Pointer to a SYSTEMTIME structure that contains the current system date
and time.
The wDayOfWeek member of the SYSTEMTIME structure is ignored.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error
information, call GetLastError.
Remarks
Windows NT/2000: The SetSystemTime function enables the SE_SYSTEMTIME_NAME
privilege before changing the system time. This privilege is disabled by
default. For more information about security privileges, see Privileges.
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--
SYSTEMTIME
The SYSTEMTIME structure represents a date and time using individual members
for the month, day, year, weekday, hour, minute, second, and millisecond.
typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME;
Members
wYear
Specifies the current year.
wMonth
Specifies the current month; January = 1, February = 2, and so on.
wDayOfWeek
Specifies the current day of the week; Sunday = 0, Monday = 1, and so on.
wDay
Specifies the current day of the month.
wHour
Specifies the current hour.
wMinute
Specifies the current minute.
wSecond
Specifies the current second.
wMilliseconds
Specifies the current millisecond.
Remarks
It is not recommended that you add and subtract values from the SYSTEMTIME
structure to obtain relative times. Instead, you should
Convert the SYSTEMTIME structure to a FILETIME structure.
Copy the resulting FILETIME structure to a ULARGE_INTEGER structure.
Use normal 64-bit arithmetic on the ULARGE_INTEGER value.
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winbase.h; include Windows.h.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--
----- Original Message -----
From: "Marcelo Guimar�es de OLiveira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, 17 de May de 2001 14:57 PM
Subject: [sqlwin] data-hora
> Caros colegas,
> Gostaria de saber se existe alguma forma de alterar a data e hora do
> windows a partir do centura 1.5
> ==============================================
> Lista de Centura SQLWindows
> Administrador : [EMAIL PROTECTED]
> [ http://www.centuraexplorer.com ]
> Para sair desta lista mande mensagem para:
> [EMAIL PROTECTED] sem nada no Subject e
> com o comando a seguir no corpo da msg:
> "unsubscribe sqlwin" (sem as aspas)
> ==============================================
>
==============================================
Lista de Centura SQLWindows
Administrador : [EMAIL PROTECTED]
[ http://www.centuraexplorer.com ]
Para sair desta lista mande mensagem para:
[EMAIL PROTECTED] sem nada no Subject e
com o comando a seguir no corpo da msg:
"unsubscribe sqlwin" (sem as aspas)
==============================================