%-- - $Revision$ - $Date$ - - Copyright (C) 2004-2005 Jive Software. All rights reserved. - - This software is published under the terms of the GNU Public License (GPL), - a copy of which is included in this distribution. --%> <%@ page import="org.jivesoftware.util.JiveGlobals, org.jivesoftware.util.LocaleUtils, org.jivesoftware.util.Log, org.jivesoftware.util.ParamUtils" %> <%@ page import="java.util.HashMap"%> <%@ page import="java.util.Locale"%> <%@ page import="java.util.Map"%> <%@ page import="java.util.TimeZone"%> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <% // Get parameters // String localeCode = ParamUtils.getParameter(request,"localeCode"); String timeZoneID = ParamUtils.getParameter(request,"timeZoneID"); boolean save = request.getParameter("save") != null; Map errors = new HashMap(); if (save) { // Set the timezeone try { TimeZone tz = TimeZone.getTimeZone(timeZoneID); JiveGlobals.setTimeZone(tz); } catch (Exception e) { Log.error(e); } Locale newLocale = null; if (localeCode != null) { newLocale = LocaleUtils.localeCodeToLocale(localeCode.trim()); if (newLocale == null) { errors.put("localeCode",""); } else { JiveGlobals.setLocale(newLocale); response.sendRedirect("server-locale.jsp?success=true"); return; } } } Locale locale = JiveGlobals.getLocale(); // Get the time zone list. String[][] timeZones = LocaleUtils.getTimeZoneList(); // Get the current time zone. TimeZone timeZone = JiveGlobals.getTimeZone(); %>