SYSDATE returns DATE and Oracle DATEs do not store time zone information. Use SYSTEMISTAMP instead - it returns TIMESTAMP WITH TIME ZONE. Also T is not a valid format element and should be enclosed in double quotes. Format element for fractional part of a second is ff, so it should be ss.ff, not as ss.s. Format element hh implies 12 hour clock and should be used together with AM or PM - I'll use 24 hour clock. To display himezone in hours and minutes use txh:tzm. And in general, RTFM - all this is clearly documented:
SQL> select to_char(systimestamp,'YYYY-MM-DD"T"hh24:mi:ss.ffTZH:TZM')
2 from dual
3 /
TO_CHAR(SYSTIMESTAMP,'YYYY-MM-DD"T"
-----------------------------------
2017-09-20T18:59:25.040000-04:00
SQL>
SY.
[Updated on: Wed, 20 September 2017 18:12]
Report message to a moderator