Connect with us

Hi, what are you looking for?

Citrix NetScaler

Setting the date, time, and time zone in FreeBSD on your Citrix NetScaler

I recently troubleshot an issue where cookie persistency was not working properly when failing over from the active node to the passive node in a Citrix Netscaler HA cluster (high availability cluster). I found the issue was that if the date and time on your appliances are not the same, the cookie will be invalid causing persistency to fail when failing over to the passive node. That’s a big issue because all your users will lose their sessions during a failover.

To quickly check your appliances:

1. SSH using Putty into your NSIPs of your Netscalers.

2. Type “shell” to enter the FreeBSD shell

3. Type “date” to see the current date, time, and time zone. Both your Netscalers should be identical.

4. If they are not identical, set the time by typing the current date and time in the following format:

date yymmddhhmm.ss

For example, to set the date to June 28, 2010 12:13 PM with 15 seconds left in the minute:

date 1006281213.45

You will get this result if you are successful:

Mon Jun 28 12:13:45 CST 2010

5. Now if your timezone says GMT or something instead of your correct time zone, then you need to navigate to timezone file directories by typing:

cd /usr/share/zoneinfo

6. Type this to list all the different zone folders:

ls -l

7. To set the timezone, copy your timezone file to the localtime folder. Below, I am setting the timezone to CST (Central Standard Time):

cp /usr/share/zoneinfo/America/Chicago /etc/localtime

8. Now just type “date” again and it should be the correct time, date, and timezone. That’s it, you’re done! Let me know if you run into any trouble. 🙂

8 Comments

8 Comments

  1. Rob Jensen

    July 3, 2010 at 12:27 PM

    Thank you!!! I was struggling with this because I kept missing the period before you type the seconds.

  2. Jason

    July 3, 2010 at 12:29 PM

    @Rob Jensen
    You are very welcome Rob. 🙂

  3. ileaneb

    July 3, 2010 at 12:50 PM

    Thank you for this great post!

  4. betshopboy

    July 3, 2010 at 12:55 PM

    Thank you very much!!!

  5. tellyworth

    July 3, 2010 at 1:15 PM

    This is a great post!

  6. Christoph Wegener

    August 22, 2011 at 5:18 AM

    Hi there.
    Just plowing through your blog posts. 🙂
    Time and date on the netscaler can be controlled (almost) completely from the CLI. No need to drop into the BSD shell.
    Look at the current time and timezone: show ns info
    Set the timezone: set ns config -timezone
    Set the time (using NTP server): add ntp server
    Enable NTP sync: enable ntp sync

    Cheers
    Christoph

  7. Christoph Wegener

    August 22, 2011 at 5:20 AM

    Let me reformat my comment and try again.

    Look at the current time and timezone:
    show ns info

    Set the timezone:
    set ns config -timezone \

    Set the time (using NTP server):
    add ntp server \

    Enable NTP sync:
    enable ntp sync

  8. Jason Samuel

    August 30, 2011 at 5:59 AM

    @Christoph Wegener

    Thanks Christoph!

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Apache

Today I would like to go over proper URL redirection when using SSL but first I would like to preface this by describing what...

Citrix Workspace

You can use FIDO2 hardware security keys plugged into your physical desktop over the Citrix HDX remoting protocol for use with virtualized Windows Desktop...

Exchange 2003

A useful Exchange 2003 guide I wrote for a friend’s blog originally but I am posting it here on mine now for your viewing...

Apache

In a worst case scenario and all your web servers have failed, what do you do? You could have a standby group of servers...

JasonSamuel.com began in 2008 as a way for me to give back to the IT community. This website features the latest news and how-to's on enterprise mobility, security, virtualization, cloud architecture, and other technologies I work with. This website has evolved over time to become a go-to reference hub for these technologies. It receives hundreds of thousands of unique visitors from all over the world each month. More details on the About Me page.
Copyright © 2008-2023 JasonSamuel.com