| | |
| | | import java.io.File; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | import java.util.TimeZone; |
| | | |
| | |
| | | logger.info("Settings : " + settings.toString()); |
| | | logTimezone("JVM timezone: ", TimeZone.getDefault()); |
| | | logTimezone("App timezone: ", getTimezone()); |
| | | logger.info("JVM locale : " + Locale.getDefault()); |
| | | logger.info("App locale : " + (getLocale() == null ? "<client>" : getLocale())); |
| | | return this; |
| | | } |
| | | |
| | |
| | | logger.info("{}{} ({})", new Object [] { type, zone.getID(), offset }); |
| | | } |
| | | |
| | | @Override |
| | | public Locale getLocale() { |
| | | String lc = settings.getString(Keys.web.forceDefaultLocale, null); |
| | | if (!StringUtils.isEmpty(lc)) { |
| | | int underscore = lc.indexOf('_'); |
| | | if (underscore > 0) { |
| | | String lang = lc.substring(0, underscore); |
| | | String cc = lc.substring(underscore + 1); |
| | | return new Locale(lang, cc); |
| | | } else { |
| | | return new Locale(lc); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * Is Gitblit running in debug mode? |
| | | * |