This is the
talk page for discussing improvements to the
C date and time functions article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | This article is rated Start-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||
|
Wikipedia is not C documentation.
Also, it's not strictly correct. On at least some systems (most?) there is time.h and sys/time.h, which are not identical. It would be nice if Wikipedia were truely autoritative, but one more partly-correct source is not helpful, IMO. — Preceding
unsigned comment added by
184.71.25.218 (
talk)
22:31, 21 August 2012 (UTC)
There is a move discussion in progress which affects this page. Please participate at Talk:C standard library - Requested move and not in this talk page section. Thank you. — RM bot 09:40, 8 November 2011 (UTC)
Regarding the "time_t - time since epoch type". This is not true actually as shown in the specification http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf See on page 350 at 7.23.1.(4) Components of time: "The range and precision of times representable in clock_t and time_t are implementation-defined.". Thus, it should be "time_t - time since epoch type for most compilers such as gcc"! (see http://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_chapter/libc_21.html) — Preceding unsigned comment added by 195.244.120.156 ( talk) 13:55, 23 November 2011 (UTC)
time_t
means "time since epoch" or "calendar time" in all contexts as per specification. The undefined thing is the format of the type, not what it represents. Thus since the previous definition doesn't specify anything about the format, it's still correct.
1exec1 (
talk)
16:28, 23 November 2011 (UTC)I propose to rename the article from C date and time operations to C date and time functions per WP:COMMONNAME. 1exec1 ( talk) 16:29, 23 November 2011 (UTC)
Recently an anonymous editor changed the whitespace from simple spaces to tabs, claiming "UNIX-style indentation" had to be with tabs, not spaces. I reverted this because a) whitespace in C can be spaces, horizontal tabs, vertical tabs and newlines, b) UNIX-style does not restrict it to tabs only, c) those massive, wide tabs seem un-aesthetic to me (that's a personal thing but the industry seems to like 3 or 4 space indentation) and d) even under flame war discussions, the original indentation was perfectly serviceable. He also claimed that (void) has to be used when the return value of printf() is ignored. It certainly can be used that way but is by no means required. To my mind, this cast gets in the way of this example. A clean, minimal source is preferred so that the topic under discussion is highlighted, without distractions. Lastly, he also added a sample compilation and invocation. This only applies to UNIX and doesn't take into account compilation and invocation under Windows, Macs, cross compilers for embedded systems, etc. This isn't an article on compiling and invoking C programs. For users not used to Unix, they now have to figure what parts of that are the commands, what parts are the prompts and what part is the actual output. Much better to simply show the output and leave it at that. Thoughts? Stepho talk 00:18, 11 March 2012 (UTC)
struct iovec {
void *iov_base;
size_t iov_len;
};
Does the value of time_t include leap seconds? — Preceding unsigned comment added by 82.139.81.0 ( talk) 06:27, 4 June 2013 (UTC)
The information is also incomplete. It only discusses those functions that deal with second precision. I came here hoping to find useful information for micro- or nanosecond double values, not merely int equivalents. — Preceding unsigned comment added by 71.179.41.98 ( talk • contribs)
This article was the subject of an educational assignment at College Of Engineering Pune supported by
Wikipedia Ambassadors through the
India Education Program during the 2011 Q3 term. Further details are available
on the course page.
The above message was substituted from {{IEP assignment}}
by
PrimeBOT (
talk) on
20:07, 1 February 2023 (UTC)
This is the
talk page for discussing improvements to the
C date and time functions article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | This article is rated Start-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||
|
Wikipedia is not C documentation.
Also, it's not strictly correct. On at least some systems (most?) there is time.h and sys/time.h, which are not identical. It would be nice if Wikipedia were truely autoritative, but one more partly-correct source is not helpful, IMO. — Preceding
unsigned comment added by
184.71.25.218 (
talk)
22:31, 21 August 2012 (UTC)
There is a move discussion in progress which affects this page. Please participate at Talk:C standard library - Requested move and not in this talk page section. Thank you. — RM bot 09:40, 8 November 2011 (UTC)
Regarding the "time_t - time since epoch type". This is not true actually as shown in the specification http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf See on page 350 at 7.23.1.(4) Components of time: "The range and precision of times representable in clock_t and time_t are implementation-defined.". Thus, it should be "time_t - time since epoch type for most compilers such as gcc"! (see http://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_chapter/libc_21.html) — Preceding unsigned comment added by 195.244.120.156 ( talk) 13:55, 23 November 2011 (UTC)
time_t
means "time since epoch" or "calendar time" in all contexts as per specification. The undefined thing is the format of the type, not what it represents. Thus since the previous definition doesn't specify anything about the format, it's still correct.
1exec1 (
talk)
16:28, 23 November 2011 (UTC)I propose to rename the article from C date and time operations to C date and time functions per WP:COMMONNAME. 1exec1 ( talk) 16:29, 23 November 2011 (UTC)
Recently an anonymous editor changed the whitespace from simple spaces to tabs, claiming "UNIX-style indentation" had to be with tabs, not spaces. I reverted this because a) whitespace in C can be spaces, horizontal tabs, vertical tabs and newlines, b) UNIX-style does not restrict it to tabs only, c) those massive, wide tabs seem un-aesthetic to me (that's a personal thing but the industry seems to like 3 or 4 space indentation) and d) even under flame war discussions, the original indentation was perfectly serviceable. He also claimed that (void) has to be used when the return value of printf() is ignored. It certainly can be used that way but is by no means required. To my mind, this cast gets in the way of this example. A clean, minimal source is preferred so that the topic under discussion is highlighted, without distractions. Lastly, he also added a sample compilation and invocation. This only applies to UNIX and doesn't take into account compilation and invocation under Windows, Macs, cross compilers for embedded systems, etc. This isn't an article on compiling and invoking C programs. For users not used to Unix, they now have to figure what parts of that are the commands, what parts are the prompts and what part is the actual output. Much better to simply show the output and leave it at that. Thoughts? Stepho talk 00:18, 11 March 2012 (UTC)
struct iovec {
void *iov_base;
size_t iov_len;
};
Does the value of time_t include leap seconds? — Preceding unsigned comment added by 82.139.81.0 ( talk) 06:27, 4 June 2013 (UTC)
The information is also incomplete. It only discusses those functions that deal with second precision. I came here hoping to find useful information for micro- or nanosecond double values, not merely int equivalents. — Preceding unsigned comment added by 71.179.41.98 ( talk • contribs)
This article was the subject of an educational assignment at College Of Engineering Pune supported by
Wikipedia Ambassadors through the
India Education Program during the 2011 Q3 term. Further details are available
on the course page.
The above message was substituted from {{IEP assignment}}
by
PrimeBOT (
talk) on
20:07, 1 February 2023 (UTC)