Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / LocaleHelper Class / FromLocalTime Method / FromLocalTime(DateTime) Method
The local time to convert.
In This Topic
    FromLocalTime(DateTime) Method
    In This Topic
    Converts a local time to utc, using the offset configured in the store settings.
    Syntax
    public static DateTime FromLocalTime( 
       DateTime local
    )

    Parameters

    local
    The local time to convert.

    Return Value

    A datetime instance with the time adjusted to utc.
    Remarks
    If local is DateTime.MinValue, or if local.Kind is DateTimeKind.Utc, local is returned unaltered.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also