日期运算
来源:互联网 发布:手机阿里云系统好用吗 编辑:程序博客网 时间:2024/06/08 18:13
struct tm LogServer::setNextTime(int internal)
{
struct tm when;
time_t now, result;
int days=internal;
time( &now );
when = *localtime( &now );
//printf( "Current time is %s/n", asctime( &when ) );
when.tm_mday = when.tm_mday + days;
if( (result = mktime( &when )) != (time_t)-1 )
{
//snprintf(ptime,36,asctime( &when ));
//printf( "In %d days the time will be %s/n", days, asctime( &when ) );
return when;
}
else
return NULL;
}
{
struct tm when;
time_t now, result;
int days=internal;
time( &now );
when = *localtime( &now );
//printf( "Current time is %s/n", asctime( &when ) );
when.tm_mday = when.tm_mday + days;
if( (result = mktime( &when )) != (time_t)-1 )
{
//snprintf(ptime,36,asctime( &when ));
//printf( "In %d days the time will be %s/n", days, asctime( &when ) );
return when;
}
else
return NULL;
}
- 日期运算
- 日期运算
- 日期运算
- js日期加减, 日期运算
- JS日期加减--------日期运算
- shell 日期运算 指定日期
- JS日期加减,日期运算
- JS日期加减,日期运算
- java 日期 运算
- js日期运算
- JAVA日期加减运算
- java日期加减运算
- JAVA日期加减运算
- JS的日期运算
- JAVA日期加减运算
- mysql日期运算
- JAVA日期加减运算
- 日期运算加减年月日
- Eclipse使用技巧
- 堆(Heap)和栈(Stack)的区别?
- 堆溢出的研究
- PMP组件与技术研究剖析
- 获取文件列表
- 日期运算
- web打印datagrid的通用类
- 我的个人主页 http://openhero.googlepages.com
- 使用栈内存速度快还是堆内存速度快?
- 毕业设计(十)-技术太超前就不是先进,而是先列了
- php生成缩略图
- VC++实现Win2000下直接读写磁盘扇区
- 比较真实的06年应届毕业生薪水
- Jabber Resource Link