Hello! I'm using HTTPCaller and FME Server's REST API to get a job timestamp (timeQueued), when it was sent to a queue. It's working well, but the timestamp should be converted to UTC. Currently local time in Finland is +3h from UTC, and due to the daylight saving, it goes to +2h in the fall. The job should be run automatically, so that I wouldn't need to put a offset parameter to the local time, which comes from REST API. Easiest solution would be that the timeQueued would come in UTC. Is it possible to configure that in FME Server?
I think the easiest (only?) solution would be to set the timezone on your server to UTC and restart.
FME Server should automatically use the time zone defined on the server it is running.
You could theoretically use Python to convert the server's local time to UTC, but it get's complicated each time DST gets involved, particularly when the clock is set back and you must account for the same timestamp occurring twice in a short timeframe.
I think the easiest (only?) solution would be to set the timezone on your server to UTC and restart.
FME Server should automatically use the time zone defined on the server it is running.
You could theoretically use Python to convert the server's local time to UTC, but it get's complicated each time DST gets involved, particularly when the clock is set back and you must account for the same timestamp occurring twice in a short timeframe.
You can use
from datetime import datetime
utc_now = datetime.utcnow()
to get the local (workstation) timestamp in UTC and use that to decide how to apply DST corrections. Find the UTC timestamps when DST begins and ends in Finland (http://www.timeanddate.com/time/change/finland/helsinki) and compare utc_now with those.
David