jenkins-bot has submitted this change and it was merged.

Change subject: Make timestamp in consistent format after loaded from database
......................................................................


Make timestamp in consistent format after loaded from database

timestamp is generated in MW format (YYYYMMDDHHMMSS)
for notification but it's
loaded into model in the database specific format.  We just need
to convert it back to MW format, it just happens that MW
format is the same as MySQL timestamp format

Change-Id: I1f7f2aeb32b63d47e92631d6daa711d9c32e4017
---
M model/Notification.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/model/Notification.php b/model/Notification.php
index 24aad9d..1f4a0f1 100644
--- a/model/Notification.php
+++ b/model/Notification.php
@@ -185,8 +185,8 @@
                        $notification->targetPage = EchoTargetPage::newFromRow( 
$row );
                }
                $notification->user = User::newFromId( $row->notification_user 
);
-               $notification->timestamp = $row->notification_timestamp;
-               $notification->readTimestamp = 
$row->notification_read_timestamp;
+               $notification->timestamp = wfTimestamp( TS_MW, 
$row->notification_timestamp );
+               $notification->readTimestamp = wfTimestamp( TS_MW, 
$row->notification_read_timestamp );
                $notification->bundleBase = $row->notification_bundle_base;
                $notification->bundleHash = $row->notification_bundle_hash;
                $notification->bundleDisplayHash = 
$row->notification_bundle_display_hash;

-- 
To view, visit https://gerrit.wikimedia.org/r/154963
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f7f2aeb32b63d47e92631d6daa711d9c32e4017
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to