The SYSTIME function returns the current time as either a date/time string, as the number of seconds elapsed since 1 January 1970, or as a Julian date/time value.
String = SYSTIME( [0 [, ElaspedSeconds]] [, /UTC] )
Seconds = SYSTIME( 1 | /SECONDS )
Julian = SYSTIME( /JULIAN [, /UTC] )
Returns the specified time.
If SecondsFlag is present and nonzero, the number of seconds elapsed since
1 January 1970 UTC is returned as a double-precision, floating-point value.
Otherwise, if SecondsFlag is not present or zero, a scalar string containing the date/time is returned in standard 24-character system format as follows:
DOW MON DD HH:MM:SS YEAR
where DOW is the day of the week, MON is the month, DD is the day of the month, HH is the hour, MM is the minute, SS is the second, and YEAR is the year. By default, the date/time string is adjusted for the local time zone; use the UTC keyword to override this default.
If the SecondsFlag argument is zero, the ElapsedSeconds argument may be set to the number of seconds past 1 January 1970 UTC. In this case, SYSTIME returns the corresponding date/time string (rather than the string for the current time). The returned date/time string is adjusted for the local time zone, unless the UTC keyword is set. If this argument is present, the JULIAN keyword is not allowed.
Set this keyword to specify that the current time is to be returned as a a double precision floating value containing the current Julian date/time. By default, the current time is adjusted for the local time zone; use the UTC keyword to override this default. This keyword is not allowed if the ElapsedSeconds argument is present.
Set this keyword to specify that the current time is to be returned as the number of seconds elapsed since 1 January 1970 UTC. This option is equivalent to setting the SecondsFlag argument to a non-zero value.
Set this keyword to specify that the value returned by SYSTIME is to be returned in Universal Time Coordinated (UTC) rather than being adjusted for the current time zone. UTC time is defined as Greenwich Mean Time updated with leap seconds.
Print today's date as a string:
Print today's date as a string in UTC (rather than local time zone):
Print today's date as a Julian date/time value in UTC:
PRINT, SYSTIME(/JULIAN, /UTC), FORMAT='(f12.2)'
Compute the seconds elapsed since 1 January 1970 UTC:
seconds = SYSTIME(1) ; or seconds = SYSTIME(/SECONDS)
Verify that the seconds from the previous example are correct:
PRINT, SYSTIME(0, seconds)
Print the day of the week:
PRINT, STRMID(SYSTIME(0), 0, 3)
Compute the time required to perform a 16,384 point FFT:
T = SYSTIME(1) A = FFT(FINDGEN(16384), -1) PRINT, SYSTIME(1) - T, 'Seconds'
CALDAT, CALENDAR, JULDAY, TIMEGEN