Namespaces
Variants
Actions

Talk:c/chrono/time

From cppreference.com
< Talk:c‎ | chrono

I wish to drop the word "calendar" from "current calendar time." Here is why:

  http://en.cppreference.com/w/c/chrono:    	"returns the current time..."
  http://en.cppreference.com/w/c/chrono/time:  "Returns the current calendar time..."

I find the discrepancy above to be confusing since:

  tm        calendar time type
  time_t    time since epoch type

An alternative suggestion is to replace "calendar" with "Epoch" as in "Returns the current Epoch time...." Elsewhere, the word "calendar" is associated with type tm, but function time() uses type time_t, or Epoch time. Newatthis (talk) 05:32, 13 June 2014 (PDT)

That would be wrong: both time_t and tm hold calendar time in C, and the function time is defined to obtain calendar time. The concept of the epoch only exists in POSIX. (oh, actually in C11, Epoch is also part of timespec description). --Cubbi (talk) 05:49, 13 June 2014 (PDT)
I understand. N1570:7.27.2.4 uses "current calendar time." Any objection to inserting the word "calendar" into function time()'s entry on the page http://en.cppreference.com/w/c/chrono? Newatthis (talk) 06:27, 13 June 2014 (PDT)
No objection to that. --Cubbi (talk) 06:40, 13 June 2014 (PDT)