Source/NFX/Time/Event.cs
/// <summary>
/// Converts localized time to UTC time as of TimeLocation property
/// </summary>
Converts localized time to UTC time as of TimeLocation property
Converts localized time to UTC time as of TimeLocation property
public DateTime LocalizedTimeToUniversalTime(DateTime local)
            {
                if (local.Kind!=DateTimeKind.Local)
                 throw new TimeException(StringConsts.ARGUMENT_ERROR+GetType().Name+".LocalizedTimeToUniversalTime(utc.Kind!=Local)");
                var loc = TimeLocation;
                if (!loc.UseParentSetting)
                {
                   return DateTime.SpecifyKind(local - TimeLocation.UTCOffset, DateTimeKind.Utc);
                }
                else
                {
                   return App.LocalizedTimeToUniversalTime(local);
                }
            }
public DateTime LocalizedTimeToUniversalTime ( DateTime local ) { if ( local . Kind != DateTimeKind . Local ) throw new TimeException ( StringConsts . ARGUMENT_ERROR + GetType ( ) . Name + " " ) ; var loc = TimeLocation ; if ( ! loc . UseParentSetting ) { return DateTime . SpecifyKind ( local - TimeLocation . UTCOffset , DateTimeKind . Utc ) ; } else { return App . LocalizedTimeToUniversalTime ( local ) ; } }
Converts localized time to UTC time as of TimeLocation property
Converts localized time to UTC time as of TimeLocation property
local
DateTime