public static DateTimeOffset GetVisualizationDateFromUrlParameters(HttpReqResp req)
{
var fallbackDate = DateTimeOffset.Now;
try
{
var dateParam = req["date"];
if (dateParam != null)
{
return DateTimeOffset.Parse(dateParam, CultureInfo.InvariantCulture);
}
}
catch { }
return fallbackDate;
}