Replace json timezone with server timezone #8

Merged
nathanwoodburn merged 2 commits from feat/config into main 2026-02-18 09:01:23 +11:00
Showing only changes of commit a88ce4e77a - Show all commits

View File

@@ -91,6 +91,8 @@ def timezone():
return jsonify( return jsonify(
{ {
"timezone": nc_config["time-zone"], "timezone": nc_config["time-zone"],
"server_timezone_name": datetime.datetime.now(datetime.timezone.utc).astimezone().tzname(),
"server_timezone_offset": datetime.datetime.now(datetime.timezone.utc).astimezone().utcoffset().total_seconds() / 3600,
"ip": getClientIP(request), "ip": getClientIP(request),
"status": HTTP_OK, "status": HTTP_OK,
} }