Ctime: Difference between revisions
Y2K was not an event |
Change dablink to use "for" template |
||
Line 1: | Line 1: | ||
{{lowercase|title=ctime}} |
{{lowercase|title=ctime}} |
||
{{for|the C++ library <ctime>|time.h}} |
|||
In [[computing]], '''ctime''' is the number of seconds since 0:00:00 [[January 1]], [[1970]] [[UTC]]. Commonly stored as a 32 bit signed [[integer (computer science)|integer]], this number is used for pinpointing dates in many [[computer]]s and [[operating system]]s, such as [[Linux]] and [[Unix|UNIX]] variants, as well as some [[programming language]]s. For example, the function ctime() was included in [[ANSI C]]. It will [[arithmetic overflow|overflow]] in [[2038]] and cause the [[year 2038 problem]]; some expect this will be a profitable non-event similar to [[Y2K]]. |
In [[computing]], '''ctime''' is the number of seconds since 0:00:00 [[January 1]], [[1970]] [[UTC]]. Commonly stored as a 32 bit signed [[integer (computer science)|integer]], this number is used for pinpointing dates in many [[computer]]s and [[operating system]]s, such as [[Linux]] and [[Unix|UNIX]] variants, as well as some [[programming language]]s. For example, the function ctime() was included in [[ANSI C]]. It will [[arithmetic overflow|overflow]] in [[2038]] and cause the [[year 2038 problem]]; some expect this will be a profitable non-event similar to [[Y2K]]. |
Revision as of 19:08, 11 February 2007
In computing, ctime is the number of seconds since 0:00:00 January 1, 1970 UTC. Commonly stored as a 32 bit signed integer, this number is used for pinpointing dates in many computers and operating systems, such as Linux and UNIX variants, as well as some programming languages. For example, the function ctime() was included in ANSI C. It will overflow in 2038 and cause the year 2038 problem; some expect this will be a profitable non-event similar to Y2K.
To determine the current ctime on a UNIX system, issue the command "date +%s
".
ctime is also a Unix library call which returns the local time as a human readable ASCII string.
ctime in a Unix filesystem is a file attribute which tells when the file's inode was last modified. See: Stat (Unix).