mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[PR #428] [MERGED] refactor: date formatting in cache tests #609
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/sigoden/dufs/pull/428
Author: @TinyTinni
Created: 8/6/2024
Status: ✅ Merged
Merged: 8/7/2024
Merged by: @sigoden
Base:
main← Head:fix-date-formatting📝 Commits (1)
4d0cfe9fix: date formatting in cache tests📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
tests/cache.rs(+1 -1)📄 Description
This PR fixes date formatting in the tests.
Problem is, that I used "%e" formatter, which space pads the days.
Therefore, those tests will pass on days with 2 numbers like 10.7.2024, but the tests will fail on single digit days like today 6.8.2024
This PR replaces the format with "%d" which does not space-pad the date but uses 0 pads.
ref link to the documentation: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
ref link, that 0 padding might be the way to go https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since under : "A 2-digit day number of the month. Examples: "04", "23"."
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.