You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I have a time zone problem when i insert data into a table
as we all know,by default ,py4web will generate timestamp on table with Built-in Field——“created_on” when inserting data.
In my project, the Built-in Field——“created_on” should be 2022-03-20 19:06:19
but display 2022-03-20 11:06:19
I have checked the settings.py and common.py , but unsolved
The text was updated successfully, but these errors were encountered:
I have a concept of local time for my app. It's defined in my settings_private.py (app is based on _scaffold):
#localization settings
import locale
from dateutil import tz
locale.setlocale(locale.LC_ALL, '')
"""
as above, takes the default settings for the server. You can check what this is using a
command line terminal on the server using the "locale" command.
Use "locale -a" to see list of supported locale's.
You can specify by replacing the empty '' above with the preferred locale
"""
DATE_FORMAT = locale.nl_langinfo(locale.D_FMT)
CURRENCY_SYMBOL = locale.nl_langinfo(locale.CRNCYSTR)[1:]
#don't currently deal with currency symbols that follow the amount
TIME_ZONE = tz.gettz('America/New_York')
#see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Hi
I have a time zone problem when i insert data into a table
as we all know,by default ,py4web will generate timestamp on table with Built-in Field——“created_on” when inserting data.
In my project, the Built-in Field——“created_on” should be
2022-03-20 19:06:19
but display
2022-03-20 11:06:19
I have checked the settings.py and common.py , but unsolved
The text was updated successfully, but these errors were encountered: