Created
August 30, 2017 08:44
-
-
Save marcojetson/cbdb1468f40481a0db0f1e2f79c2da85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
TO_CHAR(NOW(), 'YYYY-MM-DD') || | |
'T' || | |
TO_CHAR(NOW(), 'HH:MM:SS') || | |
'+' || | |
LPAD(EXTRACT(timezone_h from NOW())::TEXT, 2, '0') || | |
':' || | |
LPAD(EXTRACT(timezone_m from NOW())::TEXT, 2, '0') | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment