Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

SYSTEMTIME??

I'm using SYSTEMTIME to get current time, but it doesn't return the Hour.

SYSTEMTIME st;
GetSystemTime(&st);

DWORD hours = st.wHour;
DWORD minutes = st.wMinute;


My current time is 4:50pm, and it returns 0:50pm. The hour doesn't show anything. Anyone knows why?

Comments

  • carlycarly Member Posts: 46

    : My current time is 4:50pm, and it returns 0:50pm. The hour doesn't
    : show anything. Anyone knows why?

    You can ask on professional win32 api newsgroup :
    news://nntp.aioe.org/comp.os.ms-windows.programmer.win32
    where it has often been discussed...

  • silentHillsilentHill Member Posts: 4
    :
    : : My current time is 4:50pm, and it returns 0:50pm. The hour doesn't
    : : show anything. Anyone knows why?
    :
    : You can ask on professional win32 api newsgroup :
    : news://nntp.aioe.org/comp.os.ms-windows.programmer.win32
    : where it has often been discussed...
    :
    :

    Thank you for your advice, I will keep that in mind whenever I have question about Win32, but the problem I had earlier, now it's working.
  • sgauravvsgauravv Member Posts: 4
    : I'm using SYSTEMTIME to get current time, but it doesn't return the
    : Hour.
    :
    : SYSTEMTIME st;
    : GetSystemTime(&st);
    :
    : DWORD hours = st.wHour;
    : DWORD minutes = st.wMinute;
    :
    :
    : My current time is 4:50pm, and it returns 0:50pm. The hour doesn't
    : show anything. Anyone knows why?
    :
    :
    [size=5]hey guy........
    may be the two cases check both
    --> first check your system time it is correct
    --> Second one instead of GetSystemTime use GetLocalTime[/size][color=Red][/color]
Sign In or Register to comment.