Comet string to timestamp currently supports only Z and +/-HH:MM offsets. Spark uses Java's implementation which supports additional formats (SparkDateTimeUtils.parseTimestampString).
The Spark test DateTimeUtilsSuite - "string to timestamp" exercises these additional formats -
| Format |
Example |
±HHMM (no colon) |
2015-03-18T12:03:17+0730 |
±H:MM or ±H:M (single-digit) |
2015-03-18T12:03:17+7:30, -1:0 |
GMT±HH:MM |
2015-03-18T12:03:17GMT+07:30 |
GMT±HHMM |
2015-03-18T12:03:17GMT+0730 |
GMT±HH:MM (space-prefixed) |
2015-03-18T12:03:17.123 GMT-01:00 |
UTC / UTC |
2015-03-18 12:03:17UTC, 12:03:17.456 UTC |
UTC±HH:MM |
T18:12:15.12312 UTC+07:30 |
UT±HH:MM |
2015-03-18T12:03:17.12312 UT+07:30 |
Comet string to timestamp currently supports only
Zand+/-HH:MMoffsets. Spark uses Java's implementation which supports additional formats (SparkDateTimeUtils.parseTimestampString).The Spark test
DateTimeUtilsSuite - "string to timestamp"exercises these additional formats -±HHMM(no colon)2015-03-18T12:03:17+0730±H:MMor±H:M(single-digit)2015-03-18T12:03:17+7:30,-1:0GMT±HH:MM2015-03-18T12:03:17GMT+07:30GMT±HHMM2015-03-18T12:03:17GMT+0730GMT±HH:MM(space-prefixed)2015-03-18T12:03:17.123 GMT-01:00UTC/UTC2015-03-18 12:03:17UTC,12:03:17.456 UTCUTC±HH:MMT18:12:15.12312 UTC+07:30UT±HH:MM2015-03-18T12:03:17.12312 UT+07:30