Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename ctime to asctime and add *proper* ctime.
In C, `ctime(t)` is equivalent to `asctime(localtime(t))`, so the result should depend on the local timezone. Current `ctime` is compatible with `asctime` in C, not `ctime`. This commit renames `ctime` to `asctime` and adds `ctime` which converts the time to the local timezone before formatting it. This commit also fixes the documentation of them. Current documentation of `ctime` says it returns "a string of the current time." However, it actually returns a string of the time represented as `self`, not the time when it is called. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
- Loading branch information
Showing
1 changed file
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4530f8b
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.
saw approval from alexcrichton
at https://github.com/omasanori/rust/commit/4530f8b2ef3a44eb976715f95c7bedb4c3905e61
4530f8b
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.
merging omasanori/rust/asctime = 4530f8b into auto
4530f8b
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.
omasanori/rust/asctime = 4530f8b merged ok, testing candidate = 9766b49
4530f8b
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.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/169
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/170
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/170
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/170
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/173
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/174
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/173
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/179
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/174
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/173
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/176
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/174
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/173
4530f8b
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.
fast-forwarding master to auto = 9766b49