centos man page for function::ctime

Query: function::ctime

OS: centos

Section: 3stap

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

FUNCTION::CTIME(3stap)					      Time utility functions					    FUNCTION::CTIME(3stap)

NAME
function::ctime - Convert seconds since epoch into human readable date/time string
SYNOPSIS
ctime:string(epochsecs:long)
ARGUMENTS
epochsecs Number of seconds since epoch (as returned by gettimeofday_s)
DESCRIPTION
Takes an argument of seconds since the epoch as returned by gettimeofday_s. Returns a string of the form "Wed Jun 30 21:49:08 1993" The string will always be exactly 24 characters. If the time would be unreasonable far in the past (before what can be represented with a 32 bit offset in seconds from the epoch) an error will occur (which can be avoided with try/catch). If the time would be unreasonable far in the future, an error will also occur. Note that the epoch (zero) corresponds to "Thu Jan 1 00:00:00 1970" The earliest full date given by ctime, corresponding to epochsecs -2147483648 is "Fri Dec 13 20:45:52 1901". The latest full date given by ctime, corresponding to epochsecs 2147483647 is "Tue Jan 19 03:14:07 2038". The abbreviations for the days of the week are 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', and 'Sat'. The abbreviations for the months are 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', and 'Dec'. Note that the real C library ctime function puts a newline (' ') character at the end of the string that this function does not. Also note that since the kernel has no concept of timezones, the returned time is always in GMT. SystemTap Tapset Reference June 2014 FUNCTION::CTIME(3stap)
Related Man Pages
localtime(3) - linux
asctime(3) - linux
ctime(3) - linux
asctime(3) - redhat
localtime(3) - redhat
Similar Topics in the Unix Linux Community
Delete 6 months old files
Convert to Integer
How to check that a particular value is epoch seconds?
Convert epoch time stamp into human readable format
Convert a future date into epoch seconds on HPUX system