Next: PSX_CUSERID - Get the username
Up: Routine Descriptions
Previous: PSX_CALLOC - Allocate space for several objects of specified type
PSX_CTIME
- Convert the calendar time to a character string
- Description:
- Convert the number of ticks since the beginning of the calendar
(the value returned by
PSX_TIME)
to a character string.
- Invocation:
- CALL PSX_CTIME( NTICKS, STRING, STATUS )
- Arguments:
-
-
NTICKS = INTEGER (Given)
-
The number of ticks since the start of the calendar.
-
STRING = CHARACTER * ( * ) (Returned)
-
The character string representation of the time.
-
STATUS = INTEGER (Given)
-
The global status.
- Examples:
-
- CALL PSX_TIME( NTICKS, STATUS )
CALL PSX_CTIME( NTICKS, STRING, STATUS )
PRINT *,'The time is ',STRING
- Prints the current time as something like:
"Wed Apr 17 09:01:04 1991" (without the quotes).
- Notes:
- The C string returned by the POSIX function ctime contains a
new line character. This is removed before being passed back
to the FORTRAN routine.
- The actual argument corresponding to STRING should be at least
24 characters long.
-
External Routines Used
- cnf: cnfExprt
-
References
- POSIX standard (1988), section 8.1
- ANSI C standard (1989), section 4.12.3.2
-
Copyright
- Copyright (C) 1991 Science & Engineering Research Council
Next: PSX_CUSERID - Get the username
Up: Routine Descriptions
Previous: PSX_CALLOC - Allocate space for several objects of specified type
PSX POSIX interface routines
Starlink User Note 121
P M Allan
A J Chipperfield
10 April 2003
E-mail:ussc@star.rl.ac.uk
Copyright © 2000 Council for the Central Laboratory of the Research Councils