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
    305

    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);

    * Debian 6.0.1 on Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM.
    * lighttpd, php5, perl, eruby, python.
    * geany, XHTML & CSS & JavaScript, C, C++.
    * GTK+ C & perl-gtk2

  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
    305
    Thanks ^_^

    * Debian 6.0.1 on Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM.
    * lighttpd, php5, perl, eruby, python.
    * geany, XHTML & CSS & JavaScript, C, C++.
    * GTK+ C & perl-gtk2

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