GetSystemTime and my current time

This is a discussion on GetSystemTime and my current time within the Windows Programming forums, part of the Platform Specific Boards category; Ok...I'm using GetSystemTime to get in a string the users' system current time... But in some way SYSTEMTIME::wHour, is not ...

  1. #1
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    308

    Lightbulb GetSystemTime and my current time

    Ok...I'm using GetSystemTime to get in a string the users' system current time...

    But in some way SYSTEMTIME::wHour, is not return the correct one... I read msdn about this...but I didn't understand how to print the correct one...

    any hints?
    Code:
    SYSTEMTIME st;
    char szHora[64];
    GetSystemTime(&st);
    wsprintf(szHora, "%i:%i:%i", st.wHour, st.wMinute, st.wSecond);
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

  2. #2
    return 0;
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    89

  3. #3
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    308
    Thanks ^_^
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21