I am trying to run an Django application behind NGINX and uWSGI but am having problems with datetime.today()
returning the datetime from when the uWSGI server was started insted of today.
The configuration for the app is as follows:
<uwsgi> <plugin>python</plugin> <socket>127.0.0.1:3030</socket> <chdir>/opt/ETS/bin</chdir> <pythonpath>..</pythonpath> <module>instance</module> </uwsgi>
The settings for the uWSGI is the defaults with no changes.
How can i get the datetime to work again?
Clarification: the call is made in this function on access to a url
def create_file_header(name, ext):
return {'Content-Disposition': 'attachment; filename=%s-%s.%s' % (name, datetime.date.today(), ext) }
the call is from a urlpatten:
(r'^loading_details/basic2/$', ExpandedResource(ReadLoadingDetailHandler, authentication=authentication, headers=create_file_header('loading-details', 'csv')), FORMAT_CSV, "api_loading_details_basic_auth"),
It worked when hosted on same server using Apache WSGI