stringToUTC static method

ExpressionInterface stringToUTC(
  1. ExpressionInterface expression
)

Creates a function expression which evaluates to the ISO 8601 UTC date time string of the given ISO 8601 date string expression.

Valid date strings must start with a date in the form YYYY-MM-DD (time only string are not supported).

Times can be of the form HH:MM, HH:MM:SS, or HH:MM:SS.FFF. The leading zero is not optional (i.e. 02 is ok, 2 is not). Hours are in 24-hour format. FFF represent milliseconds, and trailing zeros are optional (i.e. 5 == 500).

The time zone can be in one of three forms: (+/-)HH:MM, (+/-)HHMM and Z which represents UTC.

If no time zone is present the the device local time zone is used.

Implementation

static ExpressionInterface stringToUTC(ExpressionInterface expression) =>
    UnaryExpression('str_to_utc()', expression);