For both categories and products you should be able to do this by setting the 'URL suffix'.
Go to the backend System &gt; Configuration Catalog section &gt; Catalog then scroll down to Search Engine Optimisations and give the Product URL Suffix and Category URL Suffix the value /

Don't forget to reindex your Catalog URL Rewrites

Internal links to end with a trailing slash
I am using  Google Time Zone API  to retrieve time zone, my code is 

$lat = round($location['lat'], 2);
$lng = round($location['lng'], 2);

$url = "https://maps.googleapis.com/maps/api/timezone/jsonlocation=".$lat.",".$lng."&amp;amp;timestamp=1419283200&amp;sensor=false";
$url = str_replace(' ','',$url);
$json_timezone = file_get_contents($url);
echo $url;
echo '&lt;pre&gt;';print_r($json_timezone);


And the output is 

https://maps.googleapis.com/maps/api/timezone/json?location=39.29,-76.64&amp;timestamp=1419283200&amp;sensor=false

{
   "status" : "INVALID_REQUEST"
}


When I run the above url, I get the correct output

{
   "dstOffset" : 0,
   "rawOffset" : -18000,
   "status" : "OK",
   "timeZoneId" : "America/New_York",
   "timeZoneName" : "Eastern Standard Time"
}


Any Idea how to solve this
