How to convert a UTC timestamp to a named timezone in SAP SQL Anywhere?
I’m using SAP SQL Anywhere 17 and have a timestamp (without time zone) which I know is UTC, and I know that my client’s browser reports a timezone of “Europe/Berlin”.
Is there an easy way to convert the UTC timestamp using SQL? Let’s assume that I have already created the timezone with
CREATE TIME ZONE "Europe/Berlin" OFFSET '01:00' DST OFFSET '01:00' DST STARTING 'Mar/last Sun' AT '02:00' DST ENDING 'Oct/last Sun' AT '02:00';
I guess it is possible to do it manually using the SYSTIMEZONE view, but it is some hours of hard work to handle all the special cases! Maybe someone has done it already, or Anywhere provides a system function which I have overlooked in the docs.