AM 1.11.2: How to set app/logs time zone?

已查看 20 次
跳至第一个未读帖子

Arthur Trip

未读,
2020年7月2日 10:03:482020/7/2
收件人 archivematica
Hi everyone,
I strongly think that this is an old problem for which perhaps someone has already given the solution but I cannot find it.
MCPServer, MCPClient and Dashboard 1.11.2 use GMT.
Storage Service 0.16.1 generates instead logs with time stamps on the San Francisco time zone.
How is it possible to align the time-zones on the components of Archivematica so that they are the desired ones?

In the Storage Service I tried to edit the file:
/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python2.7/site-packages/django/conf/global_settings.py
I have set up
TIME_ZONE = 'Europe/Luxembourg'
and
USE_TZ = True
and I restarted the services (and I tried to reboot the host too) but it didn't work.

In the DB (MariaDB 5.5) the "system_time_zone" is "CEST", "time_zone" is "system" and the host date shows the correct local time.
Some idea?

Thanks bye.

Arthy

Ross Spencer

未读,
2020年7月6日 11:17:382020/7/6
收件人 archivematica
Hi Arthy, 

Deja-vu here too. I think for 1.11 we resolved some of these issues, but not all? I don't think I can delve into this myself too soon this week, but I will leave here what I know and hope other's can give you feedback too. 


For 1.11 there was a partial fix here: https://github.com/artefactual/archivematica/pull/1583 (for issue: https://github.com/archivematica/Issues/issues/1143) and if you look at the files changes you might see other places to change your settings. There was confirmation that it was observed as fixed on an Ubuntu environment as well as our Docker dev environments. But perhaps it didn't catch all use cases? 

I hope that helps. If you find this is all you need, that's great. If you're still seeing other places the timezone isn't correct, then leaving a comment on the GitHub issue is a great idea just to provide any additional context and a +1 that this is still affecting others out there. 

Cheers,
Ross

arth...@gmail.com

未读,
2022年1月20日 12:45:292022/1/20
收件人 archivematica
After some time I returned to the problem, whose solution is trivial: the TIME_ZONE setting value must be enclosed by double quotes.
A good idea is to use UTC, so in
/etc/sysconfig/archivematica-storage-service
add:
TIME_ZONE="UTC"
回复全部
回复作者
转发
0 个新帖子