VOID INIT_FUNCTION
ExInit3 (VOID)
{
- ExInitTimeZoneInfo();
ExInitializeWorkerThreads();
ExpWin32kInit();
}
-/* $Id: sysinfo.c,v 1.55 2004/10/30 16:07:46 ion Exp $
+/* $Id: sysinfo.c,v 1.56 2004/11/05 17:42:20 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
Sti->BootTime= SystemBootTime;
Sti->CurrentTime = CurrentTime;
- Sti->TimeZoneBias.QuadPart = _SystemTimeZoneInfo.Bias;
+ Sti->TimeZoneBias.QuadPart = 0; /* FIXME */
Sti->TimeZoneId = 0; /* FIXME */
Sti->Reserved = 0; /* FIXME */
/* Class 44 - Current Time Zone Information */
QSI_DEF(SystemCurrentTimeZoneInformation)
{
- * ReqSize = sizeof (TIME_ZONE_INFORMATION);
+ * ReqSize = sizeof (TIME_ZONE_INFORMATION);
- if (sizeof (TIME_ZONE_INFORMATION) != Size)
- {
- return (STATUS_INFO_LENGTH_MISMATCH);
- }
- /* Copy the time zone information struct */
- memcpy (
- Buffer,
- & _SystemTimeZoneInfo,
- sizeof (TIME_ZONE_INFORMATION)
- );
+ if (sizeof (TIME_ZONE_INFORMATION) != Size)
+ {
+ return STATUS_INFO_LENGTH_MISMATCH;
+ }
- return (STATUS_SUCCESS);
+ /* Copy the time zone information struct */
+ memcpy(Buffer,
+ &ExpTimeZoneInfo,
+ sizeof(TIME_ZONE_INFORMATION));
+
+ return STATUS_SUCCESS;
}
SSI_DEF(SystemCurrentTimeZoneInformation)
{
- /*
- * Check user buffer's size
- */
- if (Size < sizeof (TIME_ZONE_INFORMATION))
- {
- return (STATUS_INFO_LENGTH_MISMATCH);
- }
- /* Copy the time zone information struct */
- memcpy (
- & _SystemTimeZoneInfo,
- (TIME_ZONE_INFORMATION *) Buffer,
- sizeof (TIME_ZONE_INFORMATION)
- );
- return (STATUS_SUCCESS);
+ /* Check user buffer's size */
+ if (Size < sizeof (TIME_ZONE_INFORMATION))
+ {
+ return STATUS_INFO_LENGTH_MISMATCH;
+ }
+
+ /* Copy the time zone information struct */
+ memcpy(&ExpTimeZoneInfo,
+ (TIME_ZONE_INFORMATION *)Buffer,
+ sizeof(TIME_ZONE_INFORMATION));
+
+ return STATUS_SUCCESS;
}
-/* $Id: time.c,v 1.22 2004/11/05 11:46:02 ekohl Exp $
+/* $Id: time.c,v 1.23 2004/11/05 17:42:20 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
/* GLOBALS ******************************************************************/
/* Note: Bias[minutes] = UTC - local time */
-TIME_ZONE_INFORMATION _SystemTimeZoneInfo;
+TIME_ZONE_INFORMATION ExpTimeZoneInfo;
/* FUNCTIONS ****************************************************************/
VOID INIT_FUNCTION
-ExInitTimeZoneInfo (VOID)
+ExpInitTimeZoneInfo(VOID)
{
- /* Initialize system time zone information */
- memset (& _SystemTimeZoneInfo, 0, sizeof(TIME_ZONE_INFORMATION));
+ NTSTATUS Status;
- /* FIXME: Read time zone information from the registry */
+ /* Read time zone information from the registry */
+ Status = RtlQueryTimeZoneInformation(&ExpTimeZoneInfo);
+ if (!NT_SUCCESS(Status))
+ {
+ memset(&ExpTimeZoneInfo, 0, sizeof(TIME_ZONE_INFORMATION));
+ }
}
+/*
+ * FUNCTION: Sets the system time.
+ * PARAMETERS:
+ * NewTime - Points to a variable that specified the new time
+ * of day in the standard time format.
+ * OldTime - Optionally points to a variable that receives the
+ * old time of day in the standard time format.
+ * RETURNS: Status
+ */
NTSTATUS STDCALL
NtSetSystemTime(IN PLARGE_INTEGER UnsafeNewSystemTime,
OUT PLARGE_INTEGER UnsafeOldSystemTime OPTIONAL)
- /*
- * FUNCTION: Sets the system time.
- * PARAMETERS:
- * NewTime - Points to a variable that specified the new time
- * of day in the standard time format.
- * OldTime - Optionally points to a variable that receives the
- * old time of day in the standard time format.
- * RETURNS: Status
- */
{
NTSTATUS Status;
LARGE_INTEGER OldSystemTime;
}
+/*
+ * FUNCTION: Retrieves the system time.
+ * PARAMETERS:
+ * CurrentTime - Points to a variable that receives the current
+ * time of day in the standard time format.
+ */
NTSTATUS STDCALL
-NtQuerySystemTime (OUT PLARGE_INTEGER UnsafeCurrentTime)
- /*
- * FUNCTION: Retrieves the system time.
- * PARAMETERS:
- * CurrentTime - Points to a variable that receives the current
- * time of day in the standard time format.
- */
+NtQuerySystemTime(OUT PLARGE_INTEGER UnsafeCurrentTime)
{
LARGE_INTEGER CurrentTime;
NTSTATUS Status;
VOID
STDCALL
ExLocalTimeToSystemTime (
- PLARGE_INTEGER LocalTime,
+ PLARGE_INTEGER LocalTime,
PLARGE_INTEGER SystemTime
)
{
- SystemTime->QuadPart = LocalTime->QuadPart +
- _SystemTimeZoneInfo.Bias * TICKSPERMINUTE;
+ SystemTime->QuadPart = LocalTime->QuadPart;
+#if 0
+ +
+ ExpTimeZoneInfo.Bias * TICKSPERMINUTE;
+#endif
}
+
/*
* @unimplemented
*/
UNIMPLEMENTED;
}
+
/*
* @implemented
*/
PLARGE_INTEGER LocalTime
)
{
- LocalTime->QuadPart = SystemTime->QuadPart -
- _SystemTimeZoneInfo.Bias * TICKSPERMINUTE;
+ LocalTime->QuadPart = SystemTime->QuadPart;
+#if 0
+ -
+ ExpTimeZoneInfo.Bias * TICKSPERMINUTE;
+#endif
}
/* EOF */
/* GLOBAL VARIABLES *********************************************************/
-TIME_ZONE_INFORMATION _SystemTimeZoneInfo;
+TIME_ZONE_INFORMATION ExpTimeZoneInfo;
extern POBJECT_TYPE ExEventPairObjectType;
VOID
ExpWin32kInit(VOID);
-VOID
-ExInit2 (VOID);
VOID
-ExInit3 (VOID);
-VOID
-ExInitTimeZoneInfo (VOID);
-VOID
+ExInit2(VOID);
+VOID
+ExInit3(VOID);
+VOID
+ExpInitTimeZoneInfo(VOID);
+VOID
ExInitializeWorkerThreads(VOID);
VOID
ExpInitLookasideLists(VOID);
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: main.c,v 1.202 2004/10/24 15:26:14 weiden Exp $
+/* $Id: main.c,v 1.203 2004/11/05 17:41:34 ekohl Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/main.c
CmInit2((PCHAR)KeLoaderBlock.CommandLine);
}
+ /* Initialize the time zone information from the registry */
+ ExpInitTimeZoneInfo();
+
/*
* Enter the kernel debugger before starting up the boot drivers
*/