[extensions-web] templates: Tell timeago to use UTC



commit f6beba29ff54ce5e9cb229d7f4e52e104e134675
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Jun 2 22:17:53 2012 -0400

    templates: Tell timeago to use UTC
    
    Django doesn't append the timezone identifier to its ISO 8601 output formatted
    output, so JavaScript will assume this timestamp is in the local timezone when
    parsing it. As we're deploying in the UTC timezone, the Django timestamps will
    be UTC, so append a "Z" to the output.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=665613

 .../extensions/templates/extensions/comments.html  |    2 +-
 sweettooth/review/templates/review/review.html     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sweettooth/extensions/templates/extensions/comments.html b/sweettooth/extensions/templates/extensions/comments.html
index 2a09838..5aaafd9 100644
--- a/sweettooth/extensions/templates/extensions/comments.html
+++ b/sweettooth/extensions/templates/extensions/comments.html
@@ -18,7 +18,7 @@
       <a class="comment-author" href="{% url auth-profile user=comment.user.username %}">{{ comment.user }}</a>
     </div>
     <p>{{ comment.comment }}</p>
-    <time title="{{ comment.submit_date|date:"c" }}">{{ comment.submit_date|date:"F j, Y" }}</time>
+    <time title="{{ comment.submit_date|date:"c" }}Z">{{ comment.submit_date|date:"F j, Y" }}</time>
   </div>
   <hr>
   {% empty %}
diff --git a/sweettooth/review/templates/review/review.html b/sweettooth/review/templates/review/review.html
index cf3d4be..7874bc9 100644
--- a/sweettooth/review/templates/review/review.html
+++ b/sweettooth/review/templates/review/review.html
@@ -104,7 +104,7 @@
     {% else %}
     posted a review
     {% endif %}
-    <time title="{{ review.date|date:"c" }}">{{ review.date|date:"F j, Y" }}</time>
+    <time title="{{ review.date|date:"c" }}Z">{{ review.date|date:"F j, Y" }}</time>
     <blockquote>{{ review.comments }}</blockquote>
   </div>
   {% empty %}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]