Please advise how to convert timestamps from various specified time zones to another various (or to the same) specified time zones, considering daylight saving time.
E. g. for this table with these records:
CREATE MULTISET TABLE
tmp_work_db.TIMESTAMPS_FOR_CONVERSION
, FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, CHECKSUM = DEFAULT, DEFAULT MERGEBLOCKRATIO
(
ROW_ID INTEGER
, TIMESTAMP_FROM TIMESTAMP(0)
, TIMEZONE_FROM VARCHAR(100) CHARACTER SET UNICODE NOT CASESPECIFIC NOT NULL
, TIMEZONE_TO VARCHAR(100) CHARACTER SET UNICODE NOT CASESPECIFIC NOT NULL
)
UNIQUE PRIMARY INDEX TMZN_ROW_ID (ROW_ID);
INSERT INTO tmp_work_db.TIMESTAMPS_FOR_CONVERSION (ROW_ID, TIMESTAMP_FROM, TIMEZONE_FROM, TIMEZONE_TO) VALUES (1, '2025-03-20 11:59:00', 'Europe Central', 'Africa Morocco');
INSERT INTO tmp_work_db.TIMESTAMPS_FOR_CONVERSION (ROW_ID, TIMESTAMP_FROM, TIMEZONE_FROM, TIMEZONE_TO) VALUES (2, '2024-01-31 10:00:54', 'Asia Lebanon', 'Mexico Pacific');
INSERT INTO tmp_work_db.TIMESTAMPS_FOR_CONVERSION (ROW_ID, TIMESTAMP_FROM, TIMEZONE_FROM, TIMEZONE_TO) VALUES (3, '2024-07-31 12:30:15', 'America Paraguay', 'America Paraguay');
.. i need a TERADATA SQL code that tells what's the date and time in Morocco's time zone when there is 20th of March 11:59 in Central Europe (taking the record with ROW_ID = 1 as an example). Analogically the SQL should retrieve the converted date and time for another records as specified in the table for any imaginable real-life combination of time, originating time zone and the target time zone.
BTW feel free to propose your solution even if it uses another naming conventions for time zones. My table currently uses "Strings that follow different DST and standard time zone displacements" as in docs.teradata
I've only found solutions for too specific tasks like "convert timestamps from one particular time zone to another particular time zone", like here or here or here.
I was hoping TERADATA's function "GetTimeZoneDisplacement ( time_zone_string )" could help me. But i wasn't even able to find out how the "time_zone_string" should look like and my trials like "SELECT GetTimeZoneDisplacement ('America Pacific');", "SELECT GetTimeZoneDisplacement ('GMT');" and "SELECT GetTimeZoneDisplacement ('1999-01-01 04:30+00:00');" ended with "an invalid number or type of parameters" error. link to GetTimeZoneDisplacement in docs.teradata
FYI I am a mere user of Teradata version 17.20.03.35 without admin rights.
Thanks in advance for any advice/comments