summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-05 21:29:38 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-05 21:29:38 +0800
commit05f8a1d5f8d6625e30dffcc26b70e6226ff2c025 (patch)
tree06827bf9f4e6b3f385b3205aaaf6a9e833bc4698
parent35a01c11296e1802e5f83467a9a11ce90290b89d (diff)
downloadpttbbs-05f8a1d5f8d6625e30dffcc26b70e6226ff2c025.tar
pttbbs-05f8a1d5f8d6625e30dffcc26b70e6226ff2c025.tar.gz
pttbbs-05f8a1d5f8d6625e30dffcc26b70e6226ff2c025.tar.bz2
pttbbs-05f8a1d5f8d6625e30dffcc26b70e6226ff2c025.tar.lz
pttbbs-05f8a1d5f8d6625e30dffcc26b70e6226ff2c025.tar.xz
pttbbs-05f8a1d5f8d6625e30dffcc26b70e6226ff2c025.tar.zst
pttbbs-05f8a1d5f8d6625e30dffcc26b70e6226ff2c025.zip
add INNTIMEZONE
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1926 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/config.h4
-rw-r--r--innbbsd/bbslib.c3
-rw-r--r--innbbsd/echobbslib.c3
-rw-r--r--innbbsd/receive_article.c2
-rw-r--r--sample/pttbbs.conf3
5 files changed, 12 insertions, 3 deletions
diff --git a/include/config.h b/include/config.h
index 5f9a5a73..c1ec976c 100644
--- a/include/config.h
+++ b/include/config.h
@@ -109,6 +109,10 @@
#define HOTBOARDCACHE (0) /* 熱門看板快取 */
#endif
+#ifndef INNTIMEZONE
+#define INNTIMEZONE "+0800 (CST)"
+#endif
+
/* 以下還未整理 */
#define MAX_FRIEND (256) /* 載入 cache 之最多朋友數目 */
#define MAX_REJECT (32) /* 載入 cache 之最多壞人數目 */
diff --git a/innbbsd/bbslib.c b/innbbsd/bbslib.c
index d8ab6401..9436216e 100644
--- a/innbbsd/bbslib.c
+++ b/innbbsd/bbslib.c
@@ -7,6 +7,7 @@
#include "innbbsconf.h"
#include "bbslib.h"
#endif
+#include "config.h"
char INNBBSCONF[MAXPATHLEN];
char INNDHOME[MAXPATHLEN];
@@ -572,7 +573,7 @@ ascii_date(now)
/*
* time_t now; time(&now);
*/
- strftime(datebuf, sizeof(datebuf), "%d %b %Y %X GMT", gmtime(&now));
+ strftime(datebuf, sizeof(datebuf), "%d %b %Y %X " INNTIMEZONE, gmtime(&now));
return datebuf;
}
diff --git a/innbbsd/echobbslib.c b/innbbsd/echobbslib.c
index 8eb7a99b..667c30ab 100644
--- a/innbbsd/echobbslib.c
+++ b/innbbsd/echobbslib.c
@@ -7,6 +7,7 @@
#include "innbbsconf.h"
#include "bbslib.h"
#endif
+#include "config.h"
char INNBBSCONF[MAXPATHLEN];
char INNDHOME[MAXPATHLEN];
@@ -573,7 +574,7 @@ ascii_date(now)
/*
* time_t now; time(&now);
*/
- strftime(datebuf, sizeof(datebuf), "%d %b %Y %X GMT", gmtime(&now));
+ strftime(datebuf, sizeof(datebuf), "%d %b %Y %X " INNTIMEZONE, gmtime(&now));
return datebuf;
}
diff --git a/innbbsd/receive_article.c b/innbbsd/receive_article.c
index 02e1832b..c1d8c274 100644
--- a/innbbsd/receive_article.c
+++ b/innbbsd/receive_article.c
@@ -339,7 +339,7 @@ receive_article()
{
struct tm tmbuf;
- strptime(DATE, "%d %b %Y %X GMT", &tmbuf);
+ strptime(DATE, "%d %b %Y %X ", &tmbuf);
datevalue = timegm(&tmbuf);
}
diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf
index a6ab5597..a646aa0c 100644
--- a/sample/pttbbs.conf
+++ b/sample/pttbbs.conf
@@ -145,6 +145,9 @@
若站上並不會一瞬間很多人跑去看熱門看板, 會得到反效果. */
//#define HOTBOARDCACHE 128
+/* 在轉信時附上的時區. 若在台灣, 中國大陸等地, 用預設的即可. */
+//#define INNTIMEZONE "+0800 (CST)"
+
/* 前進站畫面 */
#define INSCREEN \
"前進站畫面 (請至 pttbbs.conf 修改您的前進站畫面)"