爲什麼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