Thanks for the suggestion, but unfortunately gives the same inconsistent result during that 1 hour of DST transition. I tried:
The "int()" function is necessary otherwise the division returns floating point which is added as a fraction of a day.
An update on this. I changed my laptop's timezone, but the numeric result above is unchanged. i.e. where Tableau seems to give a localtime result, it is actually giving GMT+1. The local timezone has no effect.
On the other hand I changed my locale settings and the values changed from dd/mm/yyyy to mm/dd/yyyy. So Tableau is correctly reading the system settings.
Therefore, the function I'm using gives GMT for *all* input values *except* for that one hour in spring where it gives GMT+1.