HRESULT GetTime(
REFERENCE_TIME *pTime);

解决方案 »

  1.   

    time_t now = time(0); // 获得当前时间
      

  2.   

    struct LIST;
    {
        int i;
        LIST* next;
    }NODE;LIST qsortL (LIST h, LIST lnext)
    {
        NODE n1, n2;
        LIST p, t1 = &n1, t2 = &n2;
        if (h == NULL) return lnext;
        for (p = h->next; p != NULL;
    p = p->next)
            if (p->i < h->i)
            {
                t1->next = p;
                t1 = p;
            }
            else
            {
                t2->next = p;
                t2 = p;
            }
    t1->next = t2->next = NULL;
    h->next = qsortL(n2.next, lnext);
    return qsortL(n1.next, h);
    }
      

  3.   

    CTime t = CTime::GetCurrentTime();
      

  4.   

    CTime currenttime = CTime::GetCurrentTime();
    CString m_createtime = currenttime.Format("%#Y/%#m/%#d");
      

  5.   

    WINDOWS API:
    GetLocalTime(SYSTEMTIME &st) 本地时间
    GetSystemTime(SYSTEMTIME &st) 各林尼枝时间C:
    time();