The ctime utility formats and displays dates. The date to be formatted is specified as seconds, the number of seconds since midnight on January 1, 1970 UTC (Coordinated Universal Time, also known as Greenwich Mean Time or GMT). If the seconds argument is not specified, the current date and time is displayed. ctime displays the formatted date and time in the local time zone.
The valid input range is from 0 which yields January 1, 1970 00:00 UTC to 4294967295 which yields February 6, 2106 06:28:15 UTC. Note that very small numbers are invalid in timezones west of UTC (GMT). For example, in EST -0500, the minimum value allowed is 18000 which equals five hours of offset multiplied by 3600 seconds per hour and yields January 1, 1970 00:00 EST. The error Bad number of seconds since the epoch is given for numbers out of range.
The time is displayed using the format specified by the
The format specifiers are the same as used by the date utility.
specifies a format string to be used when displaying the date. The format string uses the same format specifiers as the date utility.
-fand -toptions are mutually exclusive. -g
displays the time as Coordinated Universal Time (UTC). This is the same as Greenwich Mean Time (GMT).
-gand -loptions are mutually exclusive. -l
displays the time using the local time zone.
-gand -loptions are mutually exclusive. -t
displays the date and time using a format compatible with the
-toption of touch. This is equivalent to specifying -f %C%y%m%d%H%M.%S
-fand -toptions are mutually exclusive.
Possible exit status values are:
Windows Server 2012. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019.
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.