]> git.lizzy.rs Git - rust.git/commit
auto merge of #15369 : omasanori/rust/asctime, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 4 Jul 2014 06:41:17 +0000 (06:41 +0000)
committerbors <bors@rust-lang.org>
Fri, 4 Jul 2014 06:41:17 +0000 (06:41 +0000)
commit9766b493fcb7de588d24f77767c7afb928db35c1
treee7bd950d4c2e74d6030230da200d50bd972e83d2
parent1bff1ff810dcfa8064c11e2b84473f053d1f69f1
parent4530f8b2ef3a44eb976715f95c7bedb4c3905e61
auto merge of #15369 : omasanori/rust/asctime, r=alexcrichton

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.
src/libtime/lib.rs