Talk:C date and time functions
![]() | C/C++ Unassessed | |||||||||
|
Wikipedia is not C documentation.
- Why not? What else would you put here? --a_dergachev 07:58, 8 October 2007 (UTC)
- He is correct, see WP:NOT#HOWTO. -- intgr [talk] 14:18, 8 October 2007 (UTC)
- Yeah Guys.. Just something to think about.. An encyclopedic Article on time.h would be - well just useless. And i'm happy with the english wikipedia as it is, with thousands of articles to even minor details, headerfiles, comic characters and so on. Please just don't take the german wiki as model, its so full of relevancy that it became entirely irrelevant. Rules like the NO-HOWTO are nice, but only IF the article would be better in an encyclopedic form - not in this case.77.11.26.13 (talk) 20:43, 16 February 2010 (UTC)
Move discussion in progress
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)
time_t
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)
- I don't understand what was wrong with the previous statement.
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)
Proposed rename
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)
- Since I've received exactly zero input, I've moved the page. If anyone disagrees, please express your concerns here. Thanks. 1exec1 (talk) 16:20, 25 November 2011 (UTC)
whitespace and compilation
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)
- I agree with all your points. I would add that indentation isn't only a personal thing - Wikipedia prefers consistent style. If we look around, we will see that most of the examples use the original indentation style. So I'd support reverting the changes to the indentation too. 1exec1 (talk) 23:49, 11 March 2012 (UTC)