Skip to content

Commit

Permalink
Fix time format spec in debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Nov 8, 2021
1 parent e389ad0 commit c1b00c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/wasi-types/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl fmt::Debug for __wasi_filestat_t {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let convert_ts_into_time_string = |ts| {
let tspec = ::time::OffsetDateTime::from_unix_timestamp_nanos(ts);
format!("{} ({})", tspec.format("%a, %d %b %Y %T %Z"), ts)
format!("{} ({})", tspec.format("%a, %d %b %Y %T %z"), ts)
};
f.debug_struct("__wasi_filestat_t")
.field("st_dev", &self.st_dev)
Expand Down
2 changes: 1 addition & 1 deletion lib/wasi-types/src/versions/snapshot0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl fmt::Debug for __wasi_filestat_t {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let convert_ts_into_time_string = |ts| {
let tspec = ::time::OffsetDateTime::from_unix_timestamp_nanos(ts);
format!("{} ({})", tspec.format("%a, %d %b %Y %T %Z"), ts)
format!("{} ({})", tspec.format("%a, %d %b %Y %T %z"), ts)
};
f.debug_struct("__wasi_filestat_t")
.field("st_dev", &self.st_dev)
Expand Down

0 comments on commit c1b00c5

Please sign in to comment.