Table of Contents

Method ToUniversalTime

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

ToUniversalTime(DateTime)

Converts a DateTime to UTC (with special handling for MinValue and MaxValue).

public static DateTime ToUniversalTime(DateTime dateTime)

Parameters

dateTime DateTime

A DateTime.

Returns

DateTime

The DateTime in UTC.