aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rwxr-xr-xweb/import.cgi6
-rwxr-xr-xweb/index.cgi4
2 files changed, 7 insertions, 3 deletions
diff --git a/web/import.cgi b/web/import.cgi
index e7746f589..919f7a653 100755
--- a/web/import.cgi
+++ b/web/import.cgi
@@ -17,6 +17,7 @@ use mySociety::Config;
use mySociety::EmailUtil;
use mySociety::EvEl;
use mySociety::GeoUtil;
+use mySociety::Locale;
sub main {
my $q = shift;
@@ -64,8 +65,9 @@ sub main {
if ( $latitude && mySociety::Config::get('COUNTRY') eq 'GB' ) {
try {
- mySociety::GeoUtil::wgs84_to_national_grid( $latitude, $longitude,
- 'G' );
+ mySociety::Locale::in_gb_locale {
+ mySociety::GeoUtil::wgs84_to_national_grid( $latitude, $longitude, 'G' );
+ };
}
catch Error::Simple with {
my $e = shift;
diff --git a/web/index.cgi b/web/index.cgi
index 2b86c42ae..f5db6e1e7 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -282,7 +282,9 @@ sub submit_problem {
# If in UK and we have a lat,lon coocdinate check it is in UK
if ( $input{latitude} && mySociety::Config::get('COUNTRY') eq 'GB' ) {
try {
- mySociety::GeoUtil::wgs84_to_national_grid($input{latitude}, $input{longitude}, 'G');
+ mySociety::Locale::in_gb_locale {
+ mySociety::GeoUtil::wgs84_to_national_grid($input{latitude}, $input{longitude}, 'G');
+ };
} catch Error::Simple with {
my $e = shift;
push @errors, "We had a problem with the supplied co-ordinates - outside the UK?";