看板 PttCurrent 關於我們 聯絡資訊
Dear developers: https://opensvn.csie.org/traccgi/pttbbs/changeset/1926 請問有關 innbbsd 中,bbslib.c 的 ascii_date 函數: - strftime(datebuf, sizeof(datebuf), "%d %b %Y %X GMT", gmtime(&now)); + strftime(datebuf, sizeof(datebuf), "%d %b %Y %X " INNTIMEZONE, gmtime(&now)); 在 include/config.h 中,INNTIMEZONE 被定義為 "+0800 (CST)", sample/pttbbs.conf 則告訴大家「若在台灣, 中國大陸等地, 用預設的即可.」。 如果沒在 pttbbs.conf 將 INNTIMEZONE 改回 "+0000 (UTC)", 會發現在使用其他系統如 Maple 等站台上,瀏覽由 pttbbs 系統站台發信的文章, 該文章發信時間倒退八小時。 為什麼輸入的資料已經是 gmtime 產生的 GMT 時間,還要導入 INNTIMEZONE 的設計? 謝謝您。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.141.122.72
kevinlau:我猜是從bios抓時間再加上時區時間? 09/19 22:09