Skip to content

Commit 98c9f2b

Browse files
nekevssjedel1043
authored andcommitted
Wrong division on epoch milliseconds
1 parent d49285f commit 98c9f2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/builtins/core/instant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl Instant {
226226
/// Returns the `epochMilliseconds` value for this `Instant`.
227227
#[must_use]
228228
pub fn epoch_milliseconds(&self) -> i64 {
229-
(self.as_i128() / 1_000_000) as i64
229+
self.as_i128().div_euclid(1_000_000) as i64
230230
}
231231

232232
/// Returns the `epochNanoseconds` value for this `Instant`.

0 commit comments

Comments
 (0)