Netscaler nstcpdump timestamp shows as UTC+0 instead of device local time(e.g. GMT+9).

Netscaler nstcpdump timestamp shows as UTC+0 instead of device local time(e.g. GMT+9).

book

Article ID: CTX567956

calendar_today

Updated On:

Description

Starting from version 13.1, when the TCPDUMP command is executed in CLI, GMT+0 time is applied instead of GMT+9 time set in Netscaler.
Nstrace is normally applied as GMT+9 time, but only TCPDUMP is applied as GMT+0

Environment

This software application is provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that: (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the software application be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the software application.

Resolution

Tcpdump and nstcpdump.sh internally uses UTC TimeZone.
 
We can Customise the timezone shown in nstcpdump.sh log using TZ environment variable.
 
Usage: In shell
export TZ=<Posix_timezone_string>
nstcpdump.sh <options>
OR
TZ=<Posix_timezone_code> nstcpdump.sh <options>
 
The option for KST would be something like this:
export TZ=KST-9
 
Also, TZ values should be picked from /usr/share/zoneinfo/. It usually has the city name.
In case the above doesn't work, you may set it to "Asia/Seoul".
 

Problem Cause

This is a behavior change on 13.1 and the latest version 13.0.
We need to manually set the Export TZ.