dami0806 commented on code in PR #6650:
URL: https://github.com/apache/opendal/pull/6650#discussion_r2424022715
##########
bindings/c/src/metadata.rs:
##########
@@ -131,7 +131,9 @@ impl opendal_metadata {
let mtime = self.deref().last_modified();
match mtime {
None => -1,
- Some(time) => time.as_millisecond(),
+ Some(time) => {
+ time.as_second() * 1000 + (time.subsec_nanosecond() /
1_000_000) as i64
+ }
Review Comment:
When I implemented the Timestamp wrapper, I added methods like as_second()
and from_millisecond(), but initially missed as_millisecond().
While working on the C bindings, this caused a compilation error. To unblock
testing, I temporarily calculated milliseconds manually (as_second() * 1000 +
subsec_nanosecond() / 1_000_000).
I should have cleaned up this temporary code afterward. I’ll now properly
add as_millisecond() to the Timestamp wrapper in core/src/raw/time.rs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]