While I was looking through dlls/ntdll/time.c I came across the following two comments: "FIXME: Compute the number of leap second corrections here" and "FIXME: get the GMT offset here" What do these mean?
nog.
Le mar 29/10/2002 à 13:55, György 'Nog' Jeney a écrit :
While I was looking through dlls/ntdll/time.c I came across the following two comments: "FIXME: Compute the number of leap second corrections here" and "FIXME: get the GMT offset here" What do these mean?
nog.
Leap seconds are seconds which are added every few years (I think there's been ten-something since 1970) to account for the difference between the time that atomic clocks count and the actual position of the earth around the sun, or something like that.
Since they are added "as needed", you can only be sure of those which have already been added in the past. The first FIXME would be to account for those (after checking MSDN, I can't say if RtlTimeToTimeFields() is supposed to do it or not).
As for the second FIXME, MSDN is very shallow on details of what is taken into account and what's not (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/kmarch/hh/k...). So I can't say either.
Advice: use it on Windows and check the result.
Vincent
Advice: use it on Windows and check the result.
Could someone compile this very simple test case under a system that has RtlTimeToTimeFields (windows 98 doesnt export this from ntdll or kernel32) and report the results?
nog.
On Tuesday 29 October 2002 20:52, György 'Nog' Jeney wrote:
Advice: use it on Windows and check the result.
Could someone compile this very simple test case under a system that has RtlTimeToTimeFields (windows 98 doesnt export this from ntdll or kernel32) and report the results?
Sorry, but any chance this is using some Wine-specific headers?
C:>bcc32 timetest.c Borland C++ 5.6 for Win32 Copyright (c) 1993, 2002 Borland timetest.c: Error E2209 timetest.c 2: Unable to open include file 'winternl.h' Error E2451 timetest.c 7: Undefined symbol 'TIME_FIELDS' in function WinMain Error E2379 timetest.c 7: Statement missing ; in function WinMain Error E2451 timetest.c 9: Undefined symbol 's' in function WinMain Error E2451 timetest.c 10: Undefined symbol 's' in function WinMain Error E2451 timetest.c 12: Undefined symbol 'tf' in function WinMain Warning W8065 timetest.c 12: Call to function 'RtlTimeToTimeFields' with no prototype in function WinMain Warning W8065 timetest.c 14: Call to function 'printf' with no prototype in function WinMain Warning W8057 timetest.c 16: Parameter 'hInstance' is never used in function WinMain Warning W8057 timetest.c 16: Parameter 'hPrev' is never used in function WinMain Warning W8057 timetest.c 16: Parameter 'lpCmdLine' is never used in function WinMain Warning W8057 timetest.c 16: Parameter 'cmd' is never used in function WinMain *** 6 errors in Compile *** C:>
-Malte
Le mar 29/10/2002 à 20:43, Malte Starostik a écrit :
On Tuesday 29 October 2002 20:52, György 'Nog' Jeney wrote:
Advice: use it on Windows and check the result.
Could someone compile this very simple test case under a system that has RtlTimeToTimeFields (windows 98 doesnt export this from ntdll or kernel32) and report the results?
Sorry, but any chance this is using some Wine-specific headers?
C:>bcc32 timetest.c Borland C++ 5.6 for Win32 Copyright (c) 1993, 2002 Borland timetest.c: Error E2209 timetest.c 2: Unable to open include file 'winternl.h'
^^^^^^^^^^^^ This header has been added to Wine because it is in the latest Windows SDK (or DDK, can't recall exactly). The test should be compilable with some other includes rather than this one if it is absent from your installation.
György, could you check which other includes can be used if winternl.h is absent? Else you'll probably have to wait for somebody which has it to compile your test.
Vincent
György, could you check which other includes can be used if winternl.h is absent? Else you''ll probably have to wait for somebody which has it to compile your test.
This is included in the latest platform SDK but it should also be defined in ntddk.h.
nog.
György, could you check which other includes can be used if winternl.h is absent? Else you''''ll probably have to wait for somebody which has it to compile your test.
This is included in the latest platform SDK but it should also be defined in ntddk.h.
Ok, could somene rather compile this test and send its results? It will be quite big...
nog.
On Wednesday 30 October 2002 09:12, György 'Nog' Jeney wrote:
György, could you check which other includes can be used if winternl.h is absent? Else you''''ll probably have to wait for somebody which has it to compile your test.
This is included in the latest platform SDK but it should also be defined in ntddk.h.
Ok, could somene rather compile this test and send its results? It will be quite big...
FWIW, RtlTimeToTimeFields() was not declared in the winternl.h included in the PSDK (August 2002) I downloaded and I didn't bother to d/l the DDK as well... I took the prototype from Wine's winternl.h instead, together with the declarations for CSHORT and TIME_FIELDS. Then bcc32 doesn't like inline in C code, so I just removed that; LARGE_INTEGER apparently has no field named "s" in the headers that came with C++ Builder, but s/RtlTime.s./RtlTime./g helped for this; finally I had to rename WinMain() to main() as I didn't find the command line switch to produce a Windows Console app :-) Also I loaded RtlTimeToTimeFields() from ntdll via GetProcAddress to avoid rebuilding the import library. Anyway, output attached.
HTH, -Malte
On Wednesday 30 October 2002 09:12, György 'Nog' Jeney wrote:
György, could you check which other includes can be used if
winternl.h is absent? Else you''''ll probably have to wait for somebody which has it to compile your test.
This is included in the latest platform SDK but it should also be
defined in ntddk.h.
Ok, could somene rather compile this test and send its results? It will be quite big...
FWIW, RtlTimeToTimeFields() was not declared in the winternl.h included in the PSDK (August 2002) I downloaded and I didn't bother to d/l the DDK as well... I took the prototype from Wine's winternl.h instead, together with the declarations for CSHORT and TIME_FIELDS. Then bcc32 doesn't like inline in C code, so I just removed that; LARGE_INTEGER apparently has no field named "s" in the headers that came with C++ Builder, but s/RtlTime.s./RtlTime./g helped for this; finally I had to rename WinMain() to main() as I didn't find the command line switch to produce a Windows Console app :-) Also I loaded RtlTimeToTimeFields() from ntdll via GetProcAddress to avoid rebuilding the import library. Anyway, output attached.
Thank you and Peter for compiling my test. This just shows that our implementation is 100% correct and that windows does ignore leap seconds.
nog.
On Wed, 30 Oct 2002, Malte Starostik wrote:
On Tuesday 29 October 2002 20:52, György 'Nog' Jeney wrote:
Advice: use it on Windows and check the result.
Could someone compile this very simple test case under a system that has RtlTimeToTimeFields (windows 98 doesnt export this from ntdll or kernel32) and report the results?
Sorry, but any chance this is using some Wine-specific headers?
C:>bcc32 timetest.c Borland C++ 5.6 for Win32 Copyright (c) 1993, 2002 Borland timetest.c: Error E2209 timetest.c 2: Unable to open include file 'winternl.h'
Not Wine specific, but winternl.h is a header that was created by Microsoft only very recently in response to governent criticism. AFAIK you will only find it in the latest Microsoft SDK... and in Wine.