Thread: GetSystemTime and my current time

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

    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
    310
    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