为gem添加源 sudo gem sources –add http://gems.github.com
strftime函数将时间格式化
May 26th, 2009
moonfox 我们可以使用strftime()函数将时间格式化为我们想要的格式。它的原型如下: size_t strftime( char *strDest, size_t maxsize, const char *format, const struct tm *timeptr ); 我们可以根据format指向字符串中格式命令把timeptr中保存的时间信息放在strDest指向的字符串中,最多向strDest中存放maxsize个字符。该函数返回向strDest指向的字符串中放置的字符数。
RSS Feed
Twitter
Posted in
Tags: