Skip to content

Commit 0c5b627

Browse files
omasanorialexcrichton
authored andcommitted
Fix minor issues in the documentation of libtime.
- When the timezone is UTC, the "zone" field of the RFC 822 format is "GMT" (or "UT"), not "UTC." - Although the name of `rfc3999` refers to RFC 3999, the documentation of it refers only to ISO 8601. This commit adds a description of the relation between ISO 8601 and RFC 3999. Signed-off-by: OGINO Masanori <[email protected]>
1 parent 451b749 commit 0c5b627

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libtime/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl Tm {
330330
* Returns a time string formatted according to RFC 822.
331331
*
332332
* local: "Thu, 22 Mar 2012 07:53:18 PST"
333-
* utc: "Thu, 22 Mar 2012 14:53:18 UTC"
333+
* utc: "Thu, 22 Mar 2012 14:53:18 GMT"
334334
*/
335335
pub fn rfc822(&self) -> String {
336336
if self.tm_gmtoff == 0_i32 {
@@ -351,7 +351,8 @@ impl Tm {
351351
}
352352

353353
/**
354-
* Returns a time string formatted according to ISO 8601.
354+
* Returns a time string formatted according to RFC 3999. RFC 3999 is
355+
* compatible with ISO 8601.
355356
*
356357
* local: "2012-02-22T07:53:18-07:00"
357358
* utc: "2012-02-22T14:53:18Z"

0 commit comments

Comments
 (0)