To reiterate the points made in the comments, the filename portion of a file destination if it contains macros uses the local timezone as syslog-ng knows it. The default value of the local timezone is detected based on the system settings (e.g. the /etc/localtime file), but can also be overridden within syslog-ng.
To override the local time zone, you can use the local-time-zone() option, which is valid both in the global options block:
options { local-time-zone("EST"); };
or in the file destination declaration:
destination d_all {
file("/install/log.$HOUR" local-time-zone("EST"));
};
If you otherwise believe that the system's default timezone is properly set, check out what the "date" command reports:
$ date
Thu Jul 6 12:15:34 UTC 2023
This shows that my local time zone points to UTC (this is in a container). If I use my host's date command:
date
Thu Jul 6 02:16:20 PM CEST 2023
e.g. it is now using CEST. This setting is controlled by /etc/localtime, which is this on my system (Debian):
$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 35 Jun 19 18:58 /etc/localtime -> /usr/share/zoneinfo/Europe/Budapest
Other distros may implement this differently (e.g. copying the file instead of symlinking it), and most distros also have some kind of high level interface for changing this setting.