Syslogs are being sent with a delay of two hours. The remote server receives the syslog after two hours have passed in local time.
The delay is seen because the SRX time is not in sync with the local time.Changing the time zone to the correct time zone that matches the local time streams the logs as expected.
Setting the timezone - CLI method
To modify the local time zone, include the time-zone statement at the [edit system] hierarchy level:
[edit system]time-zone (GMThour-offset | time-zone);
[edit]user@host# set system time-zone America/New_York ---> Choose the right time zone. [edit]user@host# showsystem { time-zone America/New_York; }
To get the current system time, use the show system uptime command with the match command to match "current".
user@host> show system uptime | match current
Setting the timezone - J-Web Configuration
To set the time zone for the device:
-- > Select Configure>System Properties>Date Time .
Click Edit.
--> In the Timezone list, select the appropriate time zone. For example, America/New_York
Click OK.
https://www.juniper.net/documentation/us/en/software/junos/time-mgmt/topics/topic-map/configure-time-zone.html