为什么RWTime是给1小时多RWTime显示的是本地时间+ 1
#include <rw/rwtime.h>
#include <rw/rwdate.h>
#include <rw/rstream.h>
main(){
RWTime t; // Current time
RWTime d(RWTime::beginDST(1990, RWZone::local()));
cout << "Current time: " << RWDate(t) << " " << t <<
endl;
cout << "Start of DST, 1990: " << RWDate(d) << " " << d <<
endl;
}
上面的程序打印:
[email protected]:/home/nmsadm/sapna/cProgS# ./a.out
Current time: 10/27/10 10/27/10 17:08:06
Start of DST, 1990: 04/01/90 04/01/90 03:00:00
但date
给出:
[email protected]:/home/nmsadm/sapna/cProgS# date
Wed Oct 27 16:08:10 IST 2010
我添加了一个“流氓波”的标签 - 它可能会帮助别人熟悉的图书馆找你的问题。 – Doug 2010-10-27 11:17:19