AlarmNotifier is printing UTC time instead of local time
search cancel

AlarmNotifier is printing UTC time instead of local time

book

Article ID: 145619

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

The OneClick Console is displaying the correct local time, but the AlarmNotifier is displaying the UTC time instead of local time, 3 hours ahead the local time.

The Windows Operating system is configured for Brasilia Time Zone - GMT-03:00

Alarm time in OneClick Console: 11:26
Alarm time in AlarmNotifier: 14:26 (3 hours ahead)


Environment

Release : 10.x, 21.x

Component : Spectrum Applications

Cause

Cygwin seems to be using an incorrect timezone

Resolution

Unset the TZ to force the Cygwin to use the Windows time.

1. Stop the AlarmNotifier (or your custom AlarmNotifier)
a) Open a bash shell (bash -login)
b) Navigate to the $SPECROOT/bin directory
c) Run: ./cmdC.exe <hostname> 2 ALARMNOTIFIER
OR
Run: ./cmdC.exe <hostname> 2 <Custom Alarm Notifier>

2. Edit the appropriate Install Ticket file and unset the TZ environment variable.
In the example below, we edit the ALARMNOTIFIER.idb file and set the following:
ENV;TZ=;


3. Restart the Spectrum Process Daemon. Note that the restart will NOT stop the SpectroSERVER application.
a) Open a bash shell (bash -login)
b) Navigate to the $SPECROOT/lib/SDMP/ directory
c) Run: ./processd.pl restart

4. Start the AlarmNotifier (or your custom AlarmNotifier)
a) Open a bash shell (bash -login)
b) Navigate to the $SPECROOT/bin/ directory
c) Run: ./launchinstdbapp.exe <hostname> ALARMNOTIFIER y NOTIFIER.OUT
OR
Run: ./launchinstdbapp.exe <hostname> <Custom Alarm Notifier> y <Custom Log file>


AlarmNotifier is now displaying the correct time (Windows local time).


Additional Information

If you are manually launching the AlarmNotifer, you can unset the TZ environment variable prior launching the AlarmNotifier.exe application.

In a bash shell (bash -login), run the following commands:

echo $TZ   (to see the current value of TZ environment variable)

unset TZ (to clear the value of TZ environment variable)

Attachments