Functions
str.format_time()
Converts the time timestamp into a string formatted according to format and timezone.
Syntax · 1 of 4
str.format_time(const int time_value, const string format, const string timezone) → const string
Arguments
time_value required const int UNIX time, in milliseconds. format required const string A format string specifying the date/time representation of the time in the returned string. All letters used in the string, except those escaped by single quotation marks ', are considered formatting tokens and will be used as a formatting instruction. The default is "yyyy-MM-dd'T'HH:mm:ssZ", which represents the ISO 8601 standard. timezone const string Allows adjusting the returned value to a time zone specified in either UTC/GMT notation (e.g., "UTC-5", "GMT+0530") or as an IANA time zone database name (e.g., "America/New_York"). Optional. The default is syminfo.timezone. Return Type
const string Syntax · 2 of 4
str.format_time(input int time_value, input string format, input string timezone) → input string
Arguments
time_value required input int UNIX time, in milliseconds. format required input string A format string specifying the date/time representation of the time in the returned string. All letters used in the string, except those escaped by single quotation marks ', are considered formatting tokens and will be used as a formatting instruction. The default is "yyyy-MM-dd'T'HH:mm:ssZ", which represents the ISO 8601 standard. timezone input string Allows adjusting the returned value to a time zone specified in either UTC/GMT notation (e.g., "UTC-5", "GMT+0530") or as an IANA time zone database name (e.g., "America/New_York"). Optional. The default is syminfo.timezone. Return Type
input string Syntax · 3 of 4
str.format_time(simple int time_value, simple string format, simple string timezone) → simple string
Arguments
time_value required simple int UNIX time, in milliseconds. format required simple string A format string specifying the date/time representation of the time in the returned string. All letters used in the string, except those escaped by single quotation marks ', are considered formatting tokens and will be used as a formatting instruction. The default is "yyyy-MM-dd'T'HH:mm:ssZ", which represents the ISO 8601 standard. timezone simple string Allows adjusting the returned value to a time zone specified in either UTC/GMT notation (e.g., "UTC-5", "GMT+0530") or as an IANA time zone database name (e.g., "America/New_York"). Optional. The default is syminfo.timezone. Return Type
simple string Syntax · 4 of 4
str.format_time(series int time_value, series string format, series string timezone) → series string
Arguments
time_value required series int UNIX time, in milliseconds. format required series string A format string specifying the date/time representation of the time in the returned string. All letters used in the string, except those escaped by single quotation marks ', are considered formatting tokens and will be used as a formatting instruction. The default is "yyyy-MM-dd'T'HH:mm:ssZ", which represents the ISO 8601 standard. timezone series string Allows adjusting the returned value to a time zone specified in either UTC/GMT notation (e.g., "UTC-5", "GMT+0530") or as an IANA time zone database name (e.g., "America/New_York"). Optional. The default is syminfo.timezone. Return Type
series string