Deprecate timestamp_nanos

This commit is contained in:
Paul Dicker 2023-09-08 21:55:45 +02:00 committed by Paul Dicker
parent 94ad32a40d
commit a174b8afad
2 changed files with 2 additions and 0 deletions

View File

@ -274,6 +274,7 @@ impl<Tz: TimeZone> DateTime<Tz> {
///
/// The dates that can be represented as nanoseconds are between 1677-09-21T00:12:44.0 and
/// 2262-04-11T23:47:16.854775804.
#[deprecated(since = "0.4.31", note = "use `timestamp_nanos_opt()` instead")]
#[inline]
#[must_use]
pub fn timestamp_nanos(&self) -> i64 {

View File

@ -460,6 +460,7 @@ impl NaiveDateTime {
///
/// The dates that can be represented as nanoseconds are between 1677-09-21T00:12:44.0 and
/// 2262-04-11T23:47:16.854775804.
#[deprecated(since = "0.4.31", note = "use `timestamp_nanos_opt()` instead")]
#[inline]
#[must_use]
pub fn timestamp_nanos(&self) -> i64 {