Checking timezone data

book

Article ID: 168139

calendar_today

Updated On:

Products

XOS

Issue/Introduction

How to check and validate timezone data within Linux, with reference to daylight-saving.If a Crossbeam system is configured, via the standard cli, to a specific timezone (say Europe/Moscow) the customer may wish to understand the implications of this, particularly in terms of when changes will be made to allow for daylight savings.

Resolution

The required data can be displayed using the Linux zdump command.

For example, if I was interested in knowing about daylight savings settings for the Moscow zone in the year 2011 I would use a command similar to this:

zdump -c 2013  -v Europe/Moscow    |  tail -n 20


Note the following:
- The year given (here 2013) should be a little after the year of interest (2011)
- The timezone name, of course, needs to match the required zone.
- The piped 'tail' command is optional but will suppress a lot of redundant data prior to the elements of interest. Potentiall the '-n 20' could require tweaking.

This command might produce output similar to this:

Europe/Moscow  Sat Oct 25 22:59:59 2008 UTC = Sun Oct 26 02:59:59 2008 MSD isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 25 23:00:00 2008 UTC = Sun Oct 26 02:00:00 2008 MSK isdst=0 gmtoff=10800
Europe/Moscow  Sat Mar 28 22:59:59 2009 UTC = Sun Mar 29 01:59:59 2009 MSK isdst=0 gmtoff=10800
Europe/Moscow  Sat Mar 28 23:00:00 2009 UTC = Sun Mar 29 03:00:00 2009 MSD isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 24 22:59:59 2009 UTC = Sun Oct 25 02:59:59 2009 MSD isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 24 23:00:00 2009 UTC = Sun Oct 25 02:00:00 2009 MSK isdst=0 gmtoff=10800
Europe/Moscow  Sat Mar 27 22:59:59 2010 UTC = Sun Mar 28 01:59:59 2010 MSK isdst=0 gmtoff=10800
Europe/Moscow  Sat Mar 27 23:00:00 2010 UTC = Sun Mar 28 03:00:00 2010 MSD isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 30 22:59:59 2010 UTC = Sun Oct 31 02:59:59 2010 MSD isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 30 23:00:00 2010 UTC = Sun Oct 31 02:00:00 2010 MSK isdst=0 gmtoff=10800
Europe/Moscow  Sat Mar 26 22:59:59 2011 UTC = Sun Mar 27 01:59:59 2011 MSK isdst=0 gmtoff=10800
Europe/Moscow  Sat Mar 26 23:00:00 2011 UTC = Sun Mar 27 03:00:00 2011 MSD isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 29 22:59:59 2011 UTC = Sun Oct 30 02:59:59 2011 MSD isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 29 23:00:00 2011 UTC = Sun Oct 30 02:00:00 2011 MSK isdst=0 gmtoff=10800
Europe/Moscow  Sat Mar 24 22:59:59 2012 UTC = Sun Mar 25 01:59:59 2012 MSK isdst=0 gmtoff=10800
Europe/Moscow  Sat Mar 24 23:00:00 2012 UTC = Sun Mar 25 03:00:00 2012 MSD isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 27 22:59:59 2012 UTC = Sun Oct 28 02:59:59 2012 MSD isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 27 23:00:00 2012 UTC = Sun Oct 28 02:00:00 2012 MSK isdst=0 gmtoff=10800


The output should be fairly self-explanatory.