pub trait PrimitiveDateTimeExt {
    fn assume_timezone<T: TimeZone>(&self, tz: &T) -> OffsetDateTime;
    fn assume_timezone_utc<T: TimeZone>(&self, tz: &T) -> OffsetDateTime;
}
Expand description

This trait is not intended to be implemented outside of this library, as such no guarantees on API stability are provided.

Required methods

👎 Deprecated since 0.6.0:

use assume_timezone_utc

Please use assume_timezone_utc as in a future version of this library, this function will assume the PrimitiveDateTime is already in the target timezone.

Creates a new OffsetDateTime with the proper offset in the given timezone.

This assumes the PrimitiveDateTime is in UTC offset.

Arguments
  • tz: the target timezone.

returns: OffsetDateTime

Implementations on Foreign Types

👎 Deprecated since 0.6.0:

use assume_timezone_utc

Implementors