Parses the specified string either as a date with time zone, or a local date time, or just a date.
Parses the specified string either as a date with time zone, or a local date time, or just a date.
In case of a date time with time zone, ISO 8601 is supported (allowing either Z for UTC or +/- followed by a time offset with or without colon, e.g. +01:30 or +0130.
In case of the time zone info missing, local date time is assumed.
Examples: 2011-10-10 or 2011-10-10T14:48:00 or 2011-10-10T14:48:00+0100 are all allowed.
This is also designed to be somewhat aligned to Date.parse in JavaScript.