Table of Contents

Method ToSecondsSinceEpoch

Namespace
MongoDB.Bson
Assembly
MongoDB.Bson.dll

ToSecondsSinceEpoch(DateTime)

Converts a DateTime to number of seconds since Unix epoch.

public static long ToSecondsSinceEpoch(DateTime dateTime)

Parameters

dateTime DateTime

A DateTime.

Returns

long

Number of seconds since Unix epoch.