Skip to content

Commit

Permalink
www: do not set LC_ALL locale
Browse files Browse the repository at this point in the history
Since we have removed WITHOUT_LOCALES in src.conf a while
back this call here causes undesided side effects.  Remove
this to restore the behaviour to what it was before the
locales were added.

Spotted by: @AdSchellevis
Also see:   opnsense/tools@e988255

This reverts commit 930f797.
This reverts commit dc53c74.
  • Loading branch information
fichtner committed Aug 7, 2017
1 parent f22ade5 commit ec58aad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/etc/rc.initial.restore
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ DATED=
for BACKUP in ${BACKUPS}; do
DATETIME=${BACKUP#*config-}
DATETIME=${DATETIME%.xml}
SUBSEC=${DATETIME#*[.,]}
DATETIME=${DATETIME%[.,]*}
SUBSEC=${DATETIME#*.}
DATETIME=${DATETIME%.*}
# write a line with all required info that is prefixed
# with a sortable time stamp for our next step...
DATED="${DATED}$(date -r ${DATETIME} '+%Y-%m-%dT%H:%M:%S').${SUBSEC} ${DATETIME} ${BACKUP}
Expand Down
1 change: 0 additions & 1 deletion src/www/guiconfig.inc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ $lang_encoding = $lang . '.UTF-8';
$textdomain = 'OPNsense';

putenv('LANG=' . $lang_encoding);
setlocale(LC_ALL, $lang_encoding);
textdomain($textdomain);
bindtextdomain($textdomain, '/usr/local/share/locale');
bind_textdomain_codeset($textdomain, $lang_encoding);
Expand Down
3 changes: 2 additions & 1 deletion src/www/widgets/api/plugins/traffic.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function traffic_api()
global $config;
$result = array();
$result['interfaces'] = legacy_interface_stats();
$result['time'] = time();
$temp = gettimeofday();
$result['time'] = (double)$temp["sec"] + (double)$temp["usec"] / 1000000.0;
// collect user friendly interface names
foreach (legacy_config_get_interfaces(array("virtual" => false)) as $interfaceKey => $interfaceData) {
if (array_key_exists($interfaceData['if'], $result['interfaces'])) {
Expand Down

0 comments on commit ec58aad

Please sign in to comment.