Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / LocaleHelper Class / FromLocalTime Method / FromLocalTime(DateTime,Double) Method
The local time to convert.
The offset to use in calculating the utc date.
In This Topic
    FromLocalTime(DateTime,Double) Method
    In This Topic
    Converts a local time to utc, based on the provided offset.
    Syntax
    public static DateTime FromLocalTime( 
       DateTime local,
       double offset
    )

    Parameters

    local
    The local time to convert.
    offset
    The offset to use in calculating the utc date.

    Return Value

    A datetime instance with the time adjusted to utc for the offset specified.
    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