Apache NiFi allows you to configure environment variables that can be accessed by processors. You can set the server's timezone as an environment variable, for example: bash Copy code export TZ="Asia/Colombo" Then, in your NiFi processor, you can access this environment variable using NiFi Expression Language: text Copy code ${env:TZ} Use NiFi System Properties:
You can pass the timezone as a system property to NiFi by modifying the nifi.properties file or setting a JVM property. Add the following line to nifi.properties or configure it as a JVM parameter:
-Duser.timezone=Asia/Colombo
Then, in a processor, use:
${sys:timezone}