HomeManualTopicsTypesSymbols

std_types::date_and_time/std::plus

adds an arbitrary time delta to a date-and-time object

Parameters

self
the date-and-time object
seconds
the number of seconds to add

Result

date_and_time
the date-and-time object with the seconds added

Example

current_time! $t println! t println! t+24*60*60

Output

2024-01-14 9:32:08.188 GMT+1 2024-01-15 9:32:08.188 GMT+1

Example

println! from_unix_time(0x7fff'ffff)

Output

2038-01-19 4:14:07.000 GMT+1

Topic

Date and Time

Implements

std::plus add two numbers of any kind

See also

std::from_unix_time constructs a date-and-time object from the number of seconds since the UNIX epoch
std_types::date_and_time/std::minus subtracts a time delta or another date-and-time object from a date-and-time object