timezone in hyperkitty
On Fri, Dec 21, 2018, at 4:07 AM, erlonmz@hotmail.com wrote:
How do I change the hyperkitty timezone?
Django's documentation should be more helpful with that.
https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-TIME_ZONE
You are looking for these settings
TIME_ZONE = 'America/Chicago' USE_TZ = True
-- thanks, Abhilash Raj (maxking)
Thanks for the answer, but in my case this did not work.
the timezone in hyperkitty still wrong.
On 1/9/19 1:07 PM, erlonmz@hotmail.com wrote:
Thanks for the answer, but in my case this did not work.
the timezone in hyperkitty still wrong.
I think the TIME_ZONE setting is overridden by your personal setting in your user-profile.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks for the answer, but the users timezones in "Profiles" and "Timezone" in config of Django Mailman 3(Django admin screen) already have the time zone that I want and the timezone in hyperkitty still wrong.
Or is it somewhere else that set the user's timezone?
thanks for listening.
I'm expirencing the same behaviour in Postorius. Is it possible to set a default timezone for new users? Already set it in settings_local.py but not having any effect, still seeing "Africa/Abidajin" in new users.
On 6/29/20 12:18 PM, Marco Marinello wrote:
I'm expirencing the same behaviour in Postorius. Is it possible to set a default timezone for new users? Already set it in settings_local.py but not having any effect, still seeing "Africa/Abidajin" in new users.
Do you mean the users time zone as displayed in the user's profile? This is a Django setting and the default should come from the TIME_ZONE setting in settings_local.py, at least if USE_TZ is set True
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
On 6/29/20 12:18 PM, Marco Marinello wrote:
I'm expirencing the same behaviour in Postorius. Is it possible to set a default timezone for new users? Already set it in settings_local.py but not having any effect, still seeing "Africa/Abidajin" in new users. Do you mean the users time zone as displayed in the user's profile? This is a Django setting and the default should come from the TIME_ZONE setting in settings_local.py, at least if USE_TZ is set True
I'm seeing the same behavior on my development site, and I was even able to reproduce this when I created my account on this very site moments ago using OAuth. If you check the django_mailman3_profile table in the DB, I expect you'll see that my timezone record is blank (since I haven't touched it from the Accounts page). FWIW, it's empty... not NULL, since there's a not-null constraint on this field.
Is it possible to have this set to a default (non-empty) value somehow? TIME_ZONE & USE_TZ isn't doing it.
I've had to find and fix this on an installation today ..
If, like mine, all your users will be OK defaulting to one timezone, you can change the default in the database model. I think that, ideally, the application would pick something sensible at account creation time instead .. but this is good enough for me today..
Find the models.py file in django3-mailman
eg, if you installed in a venv, it might be somewhere like /opt/mailman/venv/lib/python3.7/site-packages/django_mailman3/models.py
Find this line:
timezone = models.CharField(max_length=100, choices=TIMEZONES, default="")
and change the default to be what you want, eg:
timezone = models.CharField(max_length=100, choices=TIMEZONES, default="Europe/London")
Now the model needs to be updated, and the software restarted:
$ mailman-web makemigrations Migrations for 'django_mailman3': venv/lib/python3.7/site-packages/django_mailman3/migrations/0003_auto_20210521_1212.py - Alter field timezone on profile
$ mailman-web migrate Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying django_mailman3.0003_auto_20210521_1212... OK
# systemctl restart mailman-web
Test by creating a new account and viewing the profile.
participants (7)
-
Abhilash Raj
-
d-mailman@undone.org.uk
-
erlonmz@hotmail.com
-
erlonmz@terra.com.br
-
Marco Marinello
-
Mark Sapiro
-
matthew_saunders@harvard.edu