public ActionResult Checkout(string userName, string sessionId) { DateTime refTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); DateTime currentDate = DateTime.Now; long unixTime = (long)(currentDate - refTime).TotalSeconds; unixTime = (long)(currentDate - refTime).TotalSeconds; //Update purchase table //CheckoutFunctions.UpdatePurchaseTable(userName, unixTime); //Clear cart after check out CartFunctions.EmptyCart(userName); return(RedirectToAction("ViewPurchases", "History")); }