feat: Admin-Sicht System-Zeit + TZ-Liste in README/.env.example
- /api/settings gibt zusaetzlich timezone, timezone_abbr, server_time, ntp_server zurueck (alle read-only, aus Config/ENV). - AdminView zeigt neuen Abschnitt "System-Zeit" mit Zeitzone, aktueller Server-Zeit und NTP-Server samt Hinweis "wird in der .env festgelegt". - .env.example: Liste gaengiger TZ-Werte mit Link zur IANA-Vollliste. - README.md: neuer Abschnitt "Zeitzone & NTP" mit Werte-Tabelle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -145,6 +145,12 @@ def delete_user(user_id):
|
||||
@api_bp.route('/settings', methods=['GET'])
|
||||
@admin_required
|
||||
def get_settings():
|
||||
import time as _time
|
||||
from datetime import datetime as _dt
|
||||
try:
|
||||
tzname = _time.strftime('%Z')
|
||||
except Exception:
|
||||
tzname = ''
|
||||
return jsonify({
|
||||
'public_registration': AppSettings.get_bool('public_registration', default=True),
|
||||
'system_smtp_host': AppSettings.get('system_smtp_host', ''),
|
||||
@@ -155,6 +161,11 @@ def get_settings():
|
||||
'system_email_from': AppSettings.get('system_email_from', ''),
|
||||
'onlyoffice_url': os.environ.get('ONLYOFFICE_URL', ''),
|
||||
'onlyoffice_configured': bool(os.environ.get('ONLYOFFICE_URL', '')),
|
||||
# Read-only system info aus der .env
|
||||
'timezone': os.environ.get('TZ', 'Europe/Berlin'),
|
||||
'timezone_abbr': tzname,
|
||||
'server_time': _dt.now().isoformat(timespec='seconds'),
|
||||
'ntp_server': os.environ.get('NTP_SERVER', ''),
|
||||
}), 200
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user