Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

c ÓïÑÔ»ñȡϵͳʱ¼äºÍÊÀ½ç¸÷Ê±ÇøÊ±¼ä

The meaning of each is:
MemberMeaningRange
tm_sec
seconds after the minute
0-61*
tm_min
minutes after the hour
0-59
tm_hour
hours since midnight
0-23
tm_mday
day of the month
1-31
tm_mon
months since January
0-11
tm_year
years since 1900
tm_wday
days since Sunday
0-6
tm_yday
days since January 1
0-365
tm_isdst
Daylight Saving Time flag
ÏÂÃæ³ÌÐò¼ÆËãÃÀ¹ú·ï»Ë³Ç (-7)£¬Öйú±±¾©(+8)£¬ºÍ±ùµº(0)ʱ¼ä£º
#include <stdio.h>
#include <time.h> 
struct {
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
}tm;
void show(struct tm * timeinfo,int j)
{
 int day,hour;
 if(j>0)
 {
if((j+timeinfo->tm_hour)/24==1)
 day=timeinfo->tm_mday+1;
else
 day=timeinfo->tm_mday;
 hour=(j+timeinfo->tm_hour)%24;
 }
 if(j==0)
 {
 day=timeinfo->tm_mday;
 hour=(j+timeinfo->tm_hour)%24;
 }
 if(j<0)
 {
if((j+timeinfo->tm_hour)/24<0)
 day=timeinfo->tm_mday-1;
else
 day=timeinfo->tm_mday;
 hour=(j+timeinfo->tm_hour)%24;
 }
 printf ( "%4d-%02d-%02d %02d:%02d:%02d\n",1900+timeinfo->tm_year, 1+timeinfo->tm_mon,
day,hour,timeinfo->tm_min,timeinfo->tm_sec);
}
void main ()
{
time_t timer;
struct tm * timeinfo,*ptm;
time ( &timer );//Pointer to an object of type time_t, where the time value is stored.
timeinfo = localtime ( &timer);//·µ»Øµ±µØÊ±ÇøÊ±¼ä
ptm = gmtime ( &timer );//·µ»Ø¸ñÁÖÖÆÊ±ÇøÊ±¼ä
printf("°´¸ñʽÏÔʾ±ùµºÊ±¼ä\n");
show(ptm,0);
printf("°´¸ñʽÏÔʾÃÀ¹ú·ï»Ë³Çʱ¼ä\n");
show(ptm,-7);
printf("°´¸ñʽÏÔʾÖйú±±¾©Ê±¼ä\n");
show(ptm,8);
}
°´¸ñʽÏÔʾ±ùµºÊ±¼ä
2009-09-24 19:26:30
°´¸ñʽÏÔʾÃÀ¹ú·ï»Ë³Çʱ¼ä
2009-09-24 12:26:30
°´¸ñʽÏÔʾÖйú±±¾©Ê±¼ä
2009-09-25 03:26:30


Ïà¹ØÎĵµ£º

[Õª×Ôc#Bible]c#ÖÐnamespaceµÄʹÓã¨ÃüÃû¿Õ¼ä£©

The C# classes that you design will be used by code that you write and possibly by code that
other people write. Your C# classes may be used by a VB.NET application or from within an
ASP.NET page. Moreover, your classes may very well be used alongside other classes
designed by other .NET develope ......

¹ØÓÚ s3c2416 hspi spi linux Çý¶¯


        ×î½üÔÚ×ösamsung
s3c2416
ÔÚlinuxϵÄspiÇý¶¯³ÌÐò£¬²âÊÔÁËÏÂsamsung·¢²¼µÄspiµÄÄÚºËÔ´´úÂ룬ÎÞÂÛÊDzÉÓÃdma»òÕß·Çdmaģʽ¶¼ÎÞ·¨¹¤×÷¡£ÔĶÁ¸ÃÇý¶¯´úÂ룬·¢ÏÖ
ÕâÂëÓ¦¸ÃÊÇÒ»¸öδÍê³ÉµÄ°æ±¾£¬´æÔںܶàµÄbug¡£ÓÚÊÇÔÚÕâ¸ö°æ±¾µÄ»ù´¡ÉϽøÐÐÐ޸ģ¬ÖØÐ´Ò»¸ö¿ÉÓõġ¢Ö§³Öȫ˫¹¤µÄͨѶ ......

¹ØÓÚcÓïÑÔ´´½¨dllÎļþ¼°dllÎļþµÄµ÷ÓÃ

½üÀ´ÓÖÓÐÈËÔÚȺÀïÎÊÈçºÎÓÃcÓïÑÔ±àÖÆdllÎļþ£¨¶¯Ì¬Á´½Ó¿â£©¡£
Ô­À´Ã»ÓжÔÕâ¸öÎÊÌâÌ«ÔÚÒâ¹ý£¬Ò²Ã»Óг¢ÊÔ¹ýÈκνâ¾ö·½°¸£¬±Ï¾¹Ô­À´ÎÒÊÇÓÃvbµÄ£¨ÏÖÔÚÓÃ.net£©£¬×ö¸ödllÖ»²»¹ýÊǵãѡһϽ¨Á¢activeX dll¹¤³ÌµÄͼ±ê¶øÒÑ¡£½ñÌìÔÚÍøÉÏÓëÅóÓÑÁÄÌ죬¿´ÁËËûÖ¸¸øÎҵö¼¸¸öÎļþ£¬ÓÃMingW½«C³ÌÐò±àÒë³ÉdllÎļþµÄÀý×Ó£¬ÎÒ»ÐÈ»´óÎò£¬Ô­À ......

PythonµÄC/C++À©Õ¹

  Python
µÄ
C/C++
À©Õ¹
                         
By phidoit@gmail.com
 
¿ÉÀ©Õ¹ÐÔÊÇ
Python
µÄÒ»´óÌØÉ«£¬Ò»·½Ã棬ÓÉÓÚ
Python
ÊǽâÊÍÖ´Ðеģ¬Õâµ¼ÖÂÔËÐÐËÙ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ