Jump to content

Sys2FormatTime

From EDM2
Revision as of 06:21, 3 May 2020 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Converts a number of seconds from the epoch (1970-01-01 0:00:00 UTC) into a formatted date and time string.

Arguments

  1. Number of seconds (a positive integer) to be converted. (REQUIRED)
    This value cannot be greater than 2,147,483,647.
  2. Format type, one of:
    D = return in the form 'yyyy-mm-dd hh:mm:ss (w)' where w represents the weekday (0-6 where 0=Sunday) (DEFAULT)
    I = return in ISO8601 combined form 'yyyy-mm-ddThh:mm:ss[Z]'
    L = return in the form 'day month year (weekday) time' where month and weekday are language-dependent abbreviations
    Note
    With D and I, time is returned in 24-hour format; L may vary.
  3. TZ conversion flag (indicates whether to convert to UTC from local time), one of:
    U = return UTC or unconverted time
    L = assume the input is in Coordinated Universal Time, and convert to local time using the current TZ (DEFAULT)

Return Value

The formatted time string, or "" on error.