Commit fe964e5a authored by RJC's avatar RJC

changed TIMEZONE settings and added tz_detect for utc to local time conversion

parent 2cc6c087
......@@ -11,8 +11,10 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib import Path
from dotenv import load_dotenv
import os
DIRNAME = os.path.abspath(os.path.dirname(__file__))
load_dotenv()
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
......@@ -34,12 +36,14 @@ ALLOWED_HOSTS = []
INSTALLED_APPS = [
'forum.apps.ForumConfig',
'Dashboard.apps.DashboardConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'tz_detect',
]
MIDDLEWARE = [
......@@ -108,7 +112,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
TIME_ZONE = 'Asia/Hong_Kong'
USE_I18N = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment