Jump to content

Sys2FormatTime: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==Description==
Converts a number of seconds from the epoch (1970-01-01 0:00:00 UTC) into a formatted date and time string.
Converts a number of seconds from the epoch (1970-01-01 0:00:00 UTC) into a formatted date and time string.


==Arguments==
==Arguments==
1. Number of seconds (a positive integer) to be converted. (REQUIRED)
1. Number of seconds (a positive integer) to be converted. (REQUIRED)


This value cannot be greater than 2,147,483,647.
This value cannot be greater than 2,147,483,647.


2. Format type, one of:
2. Format type, one of:
      D = return in the form 'yyyy-mm-dd hh:mm:ss (w)' where w
:D = return in the form 'yyyy-mm-dd hh:mm:ss (w)' where w represents the weekday (0-6 where 0=Sunday) (DEFAULT)
          represents the weekday (0-6 where 0=Sunday) (DEFAULT)
:I = return in ISO8601 combined form 'yyyy-mm-ddThh:mm:ss[Z]'
      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
      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.
    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:
3. TZ conversion flag (indicates whether to convert to UTC from local time), one of:
      U = return UTC or unconverted time
: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)
:L = assume the input is in Coordinated Universal Time, and convert to local time using the current TZ (DEFAULT)


REXX RETURN VALUE: The formatted time string, or "" on error.
REXX RETURN VALUE: The formatted time string, or "" on error.


[[Category:The OS/2 API Project]]
[[Category:RxUtilEx]]

Revision as of 14:18, 26 February 2017

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)

REXX RETURN VALUE: The formatted time string, or "" on error.