Timezone question

I am trying to use date_time_stamp/2 to get a timestamp for a specific time in specific time zone. My local timezone is CEST, when I try to construct a timestamp in another timezone (let’s say EST) I get:

?- date_time_stamp(date(2020,2,10,2,55,0, Offset, 'EST', D), T).
Offset = -3600, % This is CEST offset
D = false,
T = 1581299700.0.

It seems ‘EST’ was ignored. However, when I do:

?- setenv('TZ', 'EST'), date_time_stamp(date(2020,2,10,2,55,0, Offset, 'EST', D), T).
Offset = 18000,
D = false,
T = 1581321300.0.

It works. It seems that date_time_stamp/2 ignores Timezone (it will unify with any atom), which is strange because that should be used to determine if daylight saving was true or false. Is this a bug or intended behaviour? I’m using swipl v8.1.21.

The time functions use the standard C runtime functions for dealing with time zones. As this is controlled from the process-wide TZ, it can only safely reason about one time zone (the current/local one) and UTC for which we do not need all this complexity.

I’m actually quite surprised that setting the environment variable does allow you to change the time zone on the fly. I doubt this is portable. You probably need something else if you want to reason about time on various places in the world in the same process.