]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix timestamps in fallback content for EventPlugin
authorBrion Vibber <brion@pobox.com>
Wed, 30 Mar 2011 19:50:56 +0000 (12:50 -0700)
committerBrion Vibber <brion@pobox.com>
Wed, 30 Mar 2011 19:50:56 +0000 (12:50 -0700)
A bunch of the common_* functions for date formatting expect an interpretable string, rather than a Unix timestamp, as input. Switched to using the DB-formatted timestamps as we put them into the object rather than the unix timestamp intermediate value when formatting the plaintext and HTML fallback content.

plugins/Event/Happening.php

index 376f27c6989b8c16ebdbfdaa617d2b6a339772ba..45398dfcf2b458c3698d5466bede3204ff3c1078 100644 (file)
@@ -156,8 +156,8 @@ class Happening extends Managed_DataObject
 
         $content = sprintf(_('"%s" %s - %s (%s): %s'),
                            $title,
-                           common_exact_date($start_time),
-                           common_exact_date($end_time),
+                           common_exact_date($ev->start_time),
+                           common_exact_date($ev->end_time),
                            $location,
                            $description);
 
@@ -169,10 +169,10 @@ class Happening extends Managed_DataObject
                               '<span class="description">%s</span> '.
                               '</span>'),
                             htmlspecialchars($title),
-                            htmlspecialchars(common_date_iso8601($start_time)),
-                            htmlspecialchars(common_exact_date($start_time)),
-                            htmlspecialchars(common_date_iso8601($end_time)),
-                            htmlspecialchars(common_exact_date($end_time)),
+                            htmlspecialchars(common_date_iso8601($ev->start_time)),
+                            htmlspecialchars(common_exact_date($ev->start_time)),
+                            htmlspecialchars(common_date_iso8601($ev->end_time)),
+                            htmlspecialchars(common_exact_date($ev->end_time)),
                             htmlspecialchars($location),
                             htmlspecialchars($description));