Exemplo n.º 1
0
        public string GetLocalTimeZoneString()
        {
            string result       = string.Empty;
            int    offset       = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).Hours;
            string offsetString = string.Empty;

            if (offset >= 0)
            {
                offsetString = string.Format("+{0}", offset.ToString("00"));
            }
            else
            {
                offsetString = offset.ToString("00");
            }
            result = string.Format("Time Zone: (GMT{0}:00)  {1}", offsetString, Common.GetDateOrTimeFormat(true, Common.GetGlobalUserProfile().DateTimeFormator));
            return(result);
        }