fnp
/
wolnelektury.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
culture pl link and compiled locales
[wolnelektury.git]
/
wolnelektury
/
utils.py
1
import pytz
2
from django.utils import timezone
3
from django.conf import settings
4
5
def localtime_to_utc(localtime):
6
return timezone.utc.normalize(
7
pytz.timezone(settings.TIME_ZONE).localize(localtime)
8
)
9
10
def utc_for_js(dt):
11
return dt.strftime('%Y/%m/%d %H:%M:%S UTC')