date: Implement setting the date on Unix & Windows#1798
date: Implement setting the date on Unix & Windows#1798sylvestre merged 19 commits intouutils:masterfrom
Conversation
Parsing the date string is not fully implemented yet, as in it relies on the internals of chrono - things like "Mon, 14 Aug 2006 02:34:56 -0600" do not work, nor does "2006-08-14 02:34:56" (no TZ / local time). This is no different to using the "--date" option however, and will get fixed when `parse_date` is a bit smarter. Only supports unix and Windows platforms for now.
|
It would be great to add tests too.
thanks |
|
Has some builds failures! |
Yeah not quite completed yet... The 32-bit platforms are still using |
|
The gnu date always outputs the current date (regardless if there was a permissions error) when setting the date - do you want to create a new issue for this or should it be done in this one? |
|
Damn, try_into() was added in a later Rust version (v1.34?)... I'll just use a normal cast. |
The TryInto trait was only available after a later version than 1.33 of Rust.
|
please run |
sylvestre
left a comment
There was a problem hiding this comment.
only minor requests!
thanks
|
@marcosatti ping? |
|
@sylvestre sorry been busy lately - will look at it later on in the week. |
|
Looks great :) |
|
Created PR #1846 for more tests. |
Fixes #1754
Implements basic functionality for setting the date under both Unix & Windows systems.
Unresolved issues:
parse_dateonly accepts limited formats for the dates input - separate issue needed?