Skip to content

Commit f099593

Browse files
committed
auto merge of #10034 : sfackler/rust/time, r=alexcrichton
These are supposed to be raw C-like structs mirroring time.h's struct tm and struct timespec.
2 parents a4ec8af + 870f3bc commit f099593

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/libextra/time.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub mod rustrt {
3434
3535

3636
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
37-
pub struct Timespec { priv sec: i64, priv nsec: i32 }
37+
pub struct Timespec { sec: i64, nsec: i32 }
3838
/*
3939
* Timespec assumes that pre-epoch Timespecs have negative sec and positive
4040
* nsec fields. Darwin's and Linux's struct timespec functions handle pre-
@@ -106,18 +106,18 @@ pub fn tzset() {
106106

107107
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
108108
pub struct Tm {
109-
priv tm_sec: i32, // seconds after the minute ~[0-60]
110-
priv tm_min: i32, // minutes after the hour ~[0-59]
111-
priv tm_hour: i32, // hours after midnight ~[0-23]
112-
priv tm_mday: i32, // days of the month ~[1-31]
113-
priv tm_mon: i32, // months since January ~[0-11]
114-
priv tm_year: i32, // years since 1900
115-
priv tm_wday: i32, // days since Sunday ~[0-6]
116-
priv tm_yday: i32, // days since January 1 ~[0-365]
117-
priv tm_isdst: i32, // Daylight Savings Time flag
118-
priv tm_gmtoff: i32, // offset from UTC in seconds
119-
priv tm_zone: ~str, // timezone abbreviation
120-
priv tm_nsec: i32, // nanoseconds
109+
tm_sec: i32, // seconds after the minute ~[0-60]
110+
tm_min: i32, // minutes after the hour ~[0-59]
111+
tm_hour: i32, // hours after midnight ~[0-23]
112+
tm_mday: i32, // days of the month ~[1-31]
113+
tm_mon: i32, // months since January ~[0-11]
114+
tm_year: i32, // years since 1900
115+
tm_wday: i32, // days since Sunday ~[0-6]
116+
tm_yday: i32, // days since January 1 ~[0-365]
117+
tm_isdst: i32, // Daylight Savings Time flag
118+
tm_gmtoff: i32, // offset from UTC in seconds
119+
tm_zone: ~str, // timezone abbreviation
120+
tm_nsec: i32, // nanoseconds
121121
}
122122

123123
pub fn empty_tm() -> Tm {

0 commit comments

Comments
 (0)