Karthick V - TLS , Chennai wrote:
Hi everyone,
I am trying to generate a time information with the time zone offset
information in the UTC format
YYYY-MM-DDTHH:MM:SS.mmm+HH:MM
Try this:
select strftime('%Y-%m-%dT%H:%M:%f', 'now', 'localtime') ||
case
when strftime('%H:%M', '12:00', 'localtime') < '12:00'
then strftime('-%H:%M', '00:00', 'utc')
else strftime('+%H:%M', '00:00', 'utc')
end;
When I run this here I get:
2006-11-28T10:29:51.091-07:00
Which is the correct timezone offset for MST.
HTH
Dennis Cote
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------