File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
time/src/sys/local_offset_at Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -59,10 +59,9 @@ fn systemtime_to_filetime(systime: &SystemTime) -> Option<FileTime> {
5959/// Convert a `FILETIME` to an `i64`, representing a number of seconds.
6060fn filetime_to_secs ( filetime : & FileTime ) -> i64 {
6161 /// FILETIME represents 100-nanosecond intervals
62- const FT_TO_SECS : i64 = Nanosecond :: per ( Second ) as i64 / 100 ;
63- ( filetime. dwHighDateTime . cast_signed ( ) . extend :: < i64 > ( ) << 32
64- | filetime. dwLowDateTime . cast_signed ( ) . extend :: < i64 > ( ) )
65- / FT_TO_SECS
62+ const FT_TO_SECS : u64 = Nanosecond :: per ( Second ) as u64 / 100 ;
63+ ( ( filetime. dwHighDateTime . extend :: < u64 > ( ) << 32 | filetime. dwLowDateTime . extend :: < u64 > ( ) )
64+ / FT_TO_SECS ) as i64
6665}
6766
6867/// Convert an [`OffsetDateTime`] to a `SYSTEMTIME`.
You can’t perform that action at this time.
0 commit comments