Added Fluxnet Site
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
|
||||
namespace LeafWeb.Web.Utility
|
||||
{
|
||||
public static class DateTimeExtensions
|
||||
{
|
||||
static string timeZoneId = ConfigurationManager.AppSettings["TimeZoneId"] ?? "W. Europe Standard Time";
|
||||
|
||||
public static DateTime ToLocalTime(this DateTime dt)
|
||||
{
|
||||
// dt.DateTimeKind should be Utc!
|
||||
var tzi = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
||||
return TimeZoneInfo.ConvertTimeFromUtc(DateTime.SpecifyKind(dt, DateTimeKind.Utc), tzi);
|
||||
}
|
||||
|
||||
public static DateTime ToUtcTime(this DateTime dt)
|
||||
{
|
||||
var tzi = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
||||
return TimeZoneInfo.ConvertTimeToUtc(dt, tzi);
|
||||
}
|
||||
|
||||
public static DateTime RoundDown(this DateTime dateTime, int minutes)
|
||||
{
|
||||
return new DateTime(dateTime.Year, dateTime.Month,
|
||||
dateTime.Day, dateTime.Hour, (dateTime.Minute / minutes) * minutes, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace LeafWeb.Web.Utility
|
||||
{
|
||||
public static class LocalizationHelper
|
||||
{
|
||||
[Obsolete("specifying the language through <meta http-equiv=\"content-language\" content= > is obsolete. Use <html lang=> instead")]
|
||||
public static IHtmlString MetaContentLanguage(this HtmlHelper html)
|
||||
{
|
||||
var acceptLang = HttpUtility.HtmlAttributeEncode(Thread.CurrentThread.CurrentUICulture.ToString());
|
||||
return new HtmlString(string.Format("<meta http-equiv=\"content-language\" content=\"{0}\"/>", acceptLang));
|
||||
}
|
||||
|
||||
public static string Lang
|
||||
{
|
||||
get
|
||||
{
|
||||
return HttpUtility.HtmlAttributeEncode(Thread.CurrentThread.CurrentUICulture.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user