From 1d8d685fc1ce6510f6827d824131e6b43c1998ae Mon Sep 17 00:00:00 2001 From: conory Date: Wed, 6 Sep 2017 23:38:42 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=98=EB=8F=84=EC=97=90=20=EB=A7=9E?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20getRegdateGM(),=20getUpdateGM()=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0=20RSS=20Feed=EC=9D=98=20=EB=82=A0=EC=A7=9C?= =?UTF-8?q?=20=ED=91=9C=EC=8B=9C=EB=A5=BC=20GMT+0=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/comment/comment.item.php | 16 ++++++++-------- modules/document/document.item.php | 16 ++++++++-------- modules/rss/rss.view.php | 6 +++--- modules/rss/tpl/format/atom10.html | 6 +++--- modules/rss/tpl/format/rss10.html | 4 ++-- modules/rss/tpl/format/rss20.html | 4 ++-- modules/rss/tpl/format/xe.html | 6 +++--- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index d66b15181..737ae0a9e 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -468,14 +468,14 @@ class commentItem extends Object return ztime($this->get('regdate')); } - function getRegdateGM() + function getRegdateGM($format = 'r') { - return gmdate('r', ztime($this->get('regdate'))); + return gmdate($format, $this->getRegdateTime()); } - function getRegdateDT() + function getRegdateDT($format = 'c') { - return zdate($this->get('regdate'), 'c', false); + return Rhymix\Framework\DateTime::formatTimestampForCurrentUser($format, $this->getRegdateTime()); } function getUpdate($format = 'Y.m.d H:i:s', $conversion = true) @@ -488,14 +488,14 @@ class commentItem extends Object return ztime($this->get('last_update')); } - function getUpdateGM() + function getUpdateGM($format = 'r') { - return gmdate('r', ztime($this->get('last_update'))); + return gmdate($format, $this->getUpdateTime()); } - function getUpdateDT() + function getUpdateDT($format = 'c') { - return zdate($this->get('last_update'), 'c', false); + return Rhymix\Framework\DateTime::formatTimestampForCurrentUser($format, $this->getUpdateTime()); } function getPermanentUrl() diff --git a/modules/document/document.item.php b/modules/document/document.item.php index dfde4a1f7..e35c583b8 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -687,14 +687,14 @@ class documentItem extends Object return ztime($this->get('regdate')); } - function getRegdateGM() + function getRegdateGM($format = 'r') { - return Rhymix\Framework\DateTime::formatTimestampForCurrentUser('r', $this->getRegdateTime()); + return gmdate($format, $this->getRegdateTime()); } - function getRegdateDT() + function getRegdateDT($format = 'c') { - return Rhymix\Framework\DateTime::formatTimestampForCurrentUser('c', $this->getRegdateTime()); + return Rhymix\Framework\DateTime::formatTimestampForCurrentUser($format, $this->getRegdateTime()); } function getUpdate($format = 'Y.m.d H:i:s', $conversion = true) @@ -707,14 +707,14 @@ class documentItem extends Object return ztime($this->get('last_update')); } - function getUpdateGM() + function getUpdateGM($format = 'r') { - return Rhymix\Framework\DateTime::formatTimestampForCurrentUser('r', $this->getUpdateTime()); + return gmdate($format, $this->getUpdateTime()); } - function getUpdateDT() + function getUpdateDT($format = 'c') { - return Rhymix\Framework\DateTime::formatTimestampForCurrentUser('c', $this->getUpdateTime()); + return Rhymix\Framework\DateTime::formatTimestampForCurrentUser($format, $this->getUpdateTime()); } function getPermanentUrl() diff --git a/modules/rss/rss.view.php b/modules/rss/rss.view.php index fb5e1534e..d08ec4b9a 100644 --- a/modules/rss/rss.view.php +++ b/modules/rss/rss.view.php @@ -174,13 +174,13 @@ class rssView extends rss } $info->id = $channel_url; - $info->title = $obj->title ?: $info->title; $info->feed_title = $config->feed_title; + $info->title = $obj->title ?: $info->title; $info->description = $obj->description ?: $info->description; $info->language = Context::getLangType(); $info->site_url = Context::getRequestUri(); - $info->dateGM = Rhymix\Framework\DateTime::formatTimestampForCurrentUser('r'); - $info->dateDT = Rhymix\Framework\DateTime::formatTimestampForCurrentUser('c'); + $info->date_r = gmdate('r'); + $info->date_c = gmdate('c'); $info->image = $config->image ? Context::getRequestUri() . $config->image : ''; getController('module')->replaceDefinedLangCode($info->title); diff --git a/modules/rss/tpl/format/atom10.html b/modules/rss/tpl/format/atom10.html index 4fafda379..ac692996b 100644 --- a/modules/rss/tpl/format/atom10.html +++ b/modules/rss/tpl/format/atom10.html @@ -6,7 +6,7 @@ {$info->description} - {$info->dateDT} + {$info->date_c} {$info->id} Rhymix {$info->feed_copyright} @@ -15,8 +15,8 @@ {$oDocument->getPermanentUrl()} - {$oDocument->getRegdateDT()} - {$oDocument->getUpdateDT()} + {$oDocument->getRegdateGM('c')} + {$oDocument->getUpdateGM('c')} {$oDocument->getNickName()} diff --git a/modules/rss/tpl/format/rss10.html b/modules/rss/tpl/format/rss10.html index 0b23212d8..a354560d4 100644 --- a/modules/rss/tpl/format/rss10.html +++ b/modules/rss/tpl/format/rss10.html @@ -7,7 +7,7 @@ {$info->link} {$info->description} {$info->language} - {$info->dateDT} + {$info->date_c} {$info->feed_copyright} @@ -30,6 +30,6 @@ {$oDocument->getPermanentUrl()} {$oDocument->getSummary(400)|escape} {$oDocument->getNickName()} - {$oDocument->getRegdateDT()} + {$oDocument->getRegdateGM('c')} diff --git a/modules/rss/tpl/format/rss20.html b/modules/rss/tpl/format/rss20.html index d11801736..2f8998caf 100644 --- a/modules/rss/tpl/format/rss20.html +++ b/modules/rss/tpl/format/rss20.html @@ -8,7 +8,7 @@ {$info->description} {$info->language} - {$info->dateGM} + {$info->date_r} Rhymix {$info->feed_copyright} @@ -30,7 +30,7 @@ {$oDocument->getNickName()} {$oDocument->getPermanentUrl()} {$oDocument->getPermanentUrl()}#comment - {$oDocument->getRegdateGM()} + {$oDocument->getRegdateGM('r')} diff --git a/modules/rss/tpl/format/xe.html b/modules/rss/tpl/format/xe.html index 287a34d28..7997b3a5d 100644 --- a/modules/rss/tpl/format/xe.html +++ b/modules/rss/tpl/format/xe.html @@ -7,7 +7,7 @@ {$info->link} {$info->description} {$info->language} - {$info->dateGM} + {$info->date_r} {$info->total_count} {$info->total_page} @@ -22,8 +22,8 @@ {$oDocument->get('tags')} {$oDocument->getCommentCount()} {$oDocument->getTrackbackCount()} - {$oDocument->getRegdateGM()} - {$oDocument->getUpdateGM()} + {$oDocument->getRegdateGM('r')} + {$oDocument->getUpdateGM('r')}