diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-24 22:06:48 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-24 22:06:48 +0800 |
commit | 9084d9602e8725a6fb832d4396c12ddd7bb2b7c7 (patch) | |
tree | 78d04dab42a50e73845c8e31eb877001fb8379cd /util/account.c | |
parent | f6324fdcb56a70815842cc39cb1826ce6b82148c (diff) | |
download | pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.gz pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.bz2 pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.lz pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.xz pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.zst pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.zip |
use time4_t(uint32_t) instead of time_t for x86-64 arch.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2426 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/account.c')
-rw-r--r-- | util/account.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/account.c b/util/account.c index 1c9ce127..c15411b8 100644 --- a/util/account.c +++ b/util/account.c @@ -98,14 +98,14 @@ main(int argc, char **argv) char buf[256], buf1[256], *p; FILE *fp, *fp1; int act[27]; /* 次數/累計時間/pointer */ - time_t now; + time4_t now; struct tm *ptime; attach_SHM(); nice(10); chdir(BBSHOME); now = time(NULL) - ADJUST_M * 60; /* back to ancent */ - ptime = localtime(&now); + ptime = localtime4(&now); memset(act, 0, sizeof(act)); printf("次數/累計時間\n"); @@ -205,7 +205,7 @@ main(int argc, char **argv) printf("此時段最多同時上線:%d 過去:%d\n", a = SHM->max_user, k); fclose(fp); if (a > k) { - ptime = localtime(&SHM->max_time); + ptime = localtime4(&SHM->max_time); if ((fp1 = fopen("etc/history", "a"))) { fprintf(fp1, "◎ 【%02d/%02d/%02d %02d:%02d】" @@ -222,7 +222,7 @@ main(int argc, char **argv) } else fclose(fp); } - ptime = localtime(&now); + ptime = localtime4(&now); if (ptime->tm_hour) { /* rotate one line in today_is */ @@ -254,7 +254,7 @@ main(int argc, char **argv) printf("壓縮使用者上線監控\n"); /* Ptt 歷史事件處理 */ now = time(NULL) - ADJUST_M * 60; /* back to ancent */ - ptime = localtime(&now); + ptime = localtime4(&now); attach_SHM(); if ((fp = fopen("etc/history.data", "r"))) { /* 單日最多次人次,同時上線 @@ -288,7 +288,7 @@ main(int argc, char **argv) fclose(fp); } now += ADJUST_M * 60; /* back to future */ - ptime = localtime(&now); + ptime = localtime4(&now); /* Ptt 節日處理 */ printf("節日處理\n"); |