ntdll: Don't use settimeofday() to attempt to set the timezone.

This commit is contained in:
Kai Blin 2007-04-11 14:18:23 +02:00 committed by Alexandre Julliard
parent 2faaa3b8de
commit 21e6beed5c

View File

@ -1054,23 +1054,9 @@ NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION *tzinfo)
* Success: STATUS_SUCCESS.
* Failure: An NTSTATUS error code indicating the problem.
*
* BUGS
* Uses the obsolete unix timezone structure and tz_dsttime member.
*/
NTSTATUS WINAPI RtlSetTimeZoneInformation( const RTL_TIME_ZONE_INFORMATION *tzinfo )
{
#ifdef HAVE_SETTIMEOFDAY
struct timezone tz;
tz.tz_minuteswest = tzinfo->Bias;
#ifdef DST_NONE
tz.tz_dsttime = DST_NONE;
#else
tz.tz_dsttime = 0;
#endif
if(!settimeofday(NULL, &tz))
return STATUS_SUCCESS;
#endif
return STATUS_PRIVILEGE_NOT_HELD;
}