frage zu time.h



  • hallo
    wie kann ich wenn ich time.h include
    die aktuelle uhrzeit und das aktuelle datum auslesen
    und in welcher form steht das datum
    tag monat jahr soll jeweils in einer eigen variable stehen
    wie gehts das

    compiler: MS VC++



  • hallo,

    auszug aus: man time.h

    The <time.h> header shall declare the structure tm, which shall include
           at least the following members:
    
                  int    tm_sec   Seconds [0,60].
                  int    tm_min   Minutes [0,59].
                  int    tm_hour  Hour [0,23].
                  int    tm_mday  Day of month [1,31].
                  int    tm_mon   Month of year [0,11].
                  int    tm_year  Years since 1900.
                  int    tm_wday  Day of week [0,6] (Sunday =0).
                  int    tm_yday  Day of year [0,365].
                  int    tm_isdst Daylight Savings flag.
    

Anmelden zum Antworten