AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

This method ensures the passed in DateTime is in UTC format then gets the numbers of ticks from that UTC time minus the number of ticks from the UTC Epoch start time.

Namespace: Amazon.Util
Assembly: AWSSDK.Core.dll
Version: 3.x.y.z

Syntax

C#
public TimeSpan GetTimeSpanInTicks(
         DateTime dateTime
)

Parameters

dateTime
Type: System.DateTime

The DateTime used to determine the TimeSpan from the Epoch start time.

Return Value


Type: TimeSpan
Returns the TimeSpan of the passed DateTime minus the Epoch start time.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer