using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace r14.Controllers
{
    public class TimeController : Controller
    {
        //
        // GET: /Time/

        public ActionResult Index()
        {
            return View();
        }

        public string GetTime(string zone)
        {
            DateTime time = DateTime.UtcNow.AddHours(offsets[zone]);
            return string.Format("<div>Czas w strefie {0} to {1:h:MM:ss tt}</div>",
                                 zone.ToUpper(), time);
        }

        private Dictionary<string, int> offsets = new Dictionary<string, int> { 
    { "utc", 0 }, { "bst", 1 }, { "mdt", -6 } 
}; 

    }
}
