mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-25 06:48:01 -05:00
long_datetime should account for timezone
This commit is contained in:
committed by
Neil Williams
parent
7c90a6ea51
commit
080d7bd895
@@ -32,6 +32,7 @@ from BeautifulSoup import BeautifulSoup
|
||||
|
||||
from time import sleep
|
||||
from datetime import datetime, timedelta
|
||||
from pylons import g
|
||||
from pylons.i18n import ungettext, _
|
||||
from r2.lib.filters import _force_unicode
|
||||
from mako.filters import url_escape
|
||||
@@ -335,7 +336,7 @@ def trunc_time(time, mins, hours=None):
|
||||
microsecond = 0)
|
||||
|
||||
def long_datetime(datetime):
|
||||
return datetime.ctime() + " GMT"
|
||||
return datetime.astimezone(g.tz).ctime() + " " + str(g.tz)
|
||||
|
||||
def median(l):
|
||||
if l:
|
||||
|
||||
Reference in New Issue
Block a user