Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

now() functionality for FixedOffest and a Utc::fixed_now() for DateTime w/ TimeZone (set to 0) #829

Closed
wants to merge 30 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fd54d9c
Bump version to 0.5
esheppa Aug 27, 2022
4c351b1
Remove dependency on time 0.1
esheppa Aug 27, 2022
7344b5f
Remove support for rustc-serialize
esheppa Aug 27, 2022
112eb8b
Remove dependency on num-traits
esheppa Aug 27, 2022
c57fa03
Rename local Duration type to TimeDelta
esheppa Aug 27, 2022
947ce94
Add branch policy explanation to PR template
djc Aug 29, 2022
6e95b07
merge 0.4.x - Add/Sub days
esheppa Aug 30, 2022
f0aace9
Merge pull request #804 from chronotope/add-sub-days-from-0.4.x-v3
djc Aug 30, 2022
339d6fb
Support AIX's TZDB location
ecnelises Aug 30, 2022
5305023
Move the `datetime::serde` timestamp visitors into the respective mod…
nickelc Apr 5, 2022
925ca99
Add `parse_from_xxx` to `DateTime<Utc>`
mqudsi Aug 31, 2022
e491167
Update RFC 2822 and RFC 3339 docs
mqudsi Sep 8, 2022
4cfaf80
NaiveDateTime::from_timestamp_millis(_opt)
Pscheidl Sep 11, 2022
e2e651d
docs: Simplify documentation for NaiveDateTime::from_timestamp_millis
Pscheidl Sep 12, 2022
9212542
docs: prefix UNIX with `the`, remove whitespaces
Pscheidl Sep 12, 2022
49c4bad
fix: Negative UNIX timestamps accepted by `from_timestamp_millis`
Pscheidl Sep 14, 2022
40800ce
refactor: Use checked substitution & convert u32 conversiont to None …
Pscheidl Sep 18, 2022
6ed65a0
adding Utc::now() that returns a DateTime with timezone (=0)
epipheus Sep 28, 2022
0ef2fbe
from_utc_datetime needs a naive dt
epipheus Sep 28, 2022
0ef3160
from_utc_datetime needs a naive dt
epipheus Sep 28, 2022
3a49eb8
from_utc_datetime needs a naive dt
epipheus Sep 28, 2022
65fe6b5
from_utc_datetime needs a naive dt
epipheus Sep 28, 2022
100b336
impl Offset now method for FixedOffset
epipheus Sep 28, 2022
3eabd1f
fixed Offset now() method for FixedOffset
epipheus Sep 28, 2022
53b6a67
FixedOffset::now() from system time
epipheus Sep 28, 2022
f800708
utc::fixed_now() overloaded to Offset::now
epipheus Sep 28, 2022
42f752e
cargo fmt
epipheus Sep 28, 2022
7cd9586
now() need std to use system time
epipheus Sep 29, 2022
60cd6da
added back use DateTime
epipheus Sep 29, 2022
dda6435
ubuntu actions complain about use crate::{Date, DateTime} seperating …
epipheus Sep 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: Simplify documentation for NaiveDateTime::from_timestamp_millis
  • Loading branch information
Pscheidl authored and djc committed Sep 19, 2022
commit e2e651d0dd3c3883c76f4a41de58db5d8d8d898b
9 changes: 4 additions & 5 deletions src/naive/datetime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,11 @@ impl NaiveDateTime {
let datetime = NaiveDateTime::from_timestamp_opt(secs, nsecs);
datetime.expect("invalid or out-of-range datetime")
}

/// Makes a new `NaiveDateTime` corresponding to a UTC date and time,
/// from the number of milliseconds
/// since the midnight UTC on January 1, 1970 (aka "UNIX timestamp").
/// Creates a new [NaiveDateTime] from milliseconds since UNIX Epoch.
///
/// UNIX epoch starts on midnight, January 1, 1970, UTC.
///
/// Returns `None` on the out-of-range number of milliseconds and/or invalid nanosecond.
/// Returns `None` on an out-of-range number of milliseconds.
///
/// # Example
///
Expand Down