-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
date: Implement setting the date on Unix & Windows #1798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?