XOOPS模組開發記錄
一、在表單
// 第一天上課日期 $row['first_date'] = !isset($row['first_date']) ? date("Y-m-d", xoops_getUserTimestamp(strtotime("now"))) : date("Y-m-d", xoops_getUserTimestamp($row['first_date']));二、在列表
while ($row = $xoopsDB->fetchArray($result)) { // 撈出->過濾資料 $row = filterData($row, $strus); $row['first_date'] = intval($row['first_date']); //開學第1天 $row['first_date'] = $row['first_date'] ? date("Y-m-d", xoops_getUserTimestamp($row['first_date'])) : ""; $rows[] = $row; }三、在儲存
// 資料轉換 $_POST['first_date'] = userTimeToServerTime(strtotime($_POST['first_date'])); //轉成主機日期三、指令
-
會員表單時間:xoops_getUserTimestamp(time())