pub struct TimeZoneUtils;Expand description
Time zone utilities
Implementations§
Source§impl TimeZoneUtils
impl TimeZoneUtils
Sourcepub fn convert_timezone(
timestamp: Timestamp,
from_tz: &str,
to_tz: &str,
) -> Result<Timestamp, UtilsError>
pub fn convert_timezone( timestamp: Timestamp, from_tz: &str, to_tz: &str, ) -> Result<Timestamp, UtilsError>
Convert timestamp from one timezone to another
Sourcepub fn start_of_day(timestamp: Timestamp) -> Timestamp
pub fn start_of_day(timestamp: Timestamp) -> Timestamp
Get timestamp for start of day
Sourcepub fn end_of_day(timestamp: Timestamp) -> Timestamp
pub fn end_of_day(timestamp: Timestamp) -> Timestamp
Get timestamp for end of day
Auto Trait Implementations§
impl Freeze for TimeZoneUtils
impl RefUnwindSafe for TimeZoneUtils
impl Send for TimeZoneUtils
impl Sync for TimeZoneUtils
impl Unpin for TimeZoneUtils
impl UnwindSafe for TimeZoneUtils
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more