
wminfo README.timezone.wmi


The timezone.wmi plugin displays the times and the dates in different time
zones stored in timezone.cfg configuration file.  There are four types of
the configuration files accepted by timezone.wmi.  All of them display the
other data:

    +---------+     +---------+     +---------+     +---------+
    |EDT 20:50|     |NY 20:50-|     |+02 22:50|     |O 22:50- |
    |GMT 00:50|     |GH 00:50 |     |+01 23:50|     |N 23:50- |
    |MSK 04:50| or: |RU 04:50 | or: |+00 00:50| or: |Z 00:50  |
    |IST 06:20|     |IN 06:20 |     |-01 01:50|     |A 01:50  |
    |EST 10:50|     |AU 10:50 |     |-02 02:50|     |B 02:50  |
    +---------+     +---------+     +---------+     +---------+

Depending on your needs you can read below about one of these four
configuration types.

There is one rule: the names of the time zones used in the timezone.cfg
configuration file have to be compatible with the data stored in
/usr/share/zoneinfo directory (for example: Poland, or Europe/Warsaw, or
CET, or GMT-02).  To get the right time zone name you can use tzselect
program.  Just run it and reply the questions in the interactive way.


1. The simple configuration file uses time zones descriptions, for example:

        America/New_York
        Africa/Accra
        Europe/Moscow
        Asia/Kolkata
        Australia/Sydney

   In such a case timezone.wmi plugin displays the following data:

        EDT 20:50- 05-21
        GMT 00:50  05-22
        MSK 04:50  05-22
        IST 06:20  05-22
        EST 10:50  05-22

   That looks in wminfo window like:

        +---------+
        |EDT 20:50|
        |GMT 00:50|
        |MSK 04:50|
        |IST 06:20|
        |EST 10:50|
        +---------+

   The abbreviations from the first column are the time zones abbreviations
   shortened to the first three letters.

   You will find the sample configuration file in that format in
   timezone.cfg.Reg-Cty.zones file.  To use it copy it to timezone.cfg file
   and store it in /usr/local/bin directory or ~/bin directory.

2. The more complicated configuration file uses the same time zones
   descriptions as above with ISO codes in the second column (the third
   column is ignored by the plugin), for example:

        America/New_York	NY	(New York)
        Africa/Accra		GH	(Ghana)
        Europe/Moscow		RU	(Russian Federation)
        Asia/Kolkata		IN	(India)
        Australia/Sydney	AU	(Australia)

   (You will find ISO codes of different countries, states, or islands in
   http://en.wikipedia.org.)

   In such a case timezone.wmi displays the following data:

        NY 20:50- 05-21
        GH 00:50  05-22
        RU 04:50  05-22
        IN 06:20  05-22
        AU 10:50  05-22

   That looks in wminfo window like:

        +---------+
        |NY 20:50-|
        |GH 00:50 |
        |RU 04:50 |
        |IN 06:20 |
        |AU 10:50 |
        +---------+

   The abbreviations from the first column are the same as the labels from
   the second column of the timezone.cfg file.  The - sign marks the past
   dates and the + sign marks the future days (referenced to your time
   zone).

   You will find the sample configuration file in that format in
   timezone.cfg.Reg-Cty.ISOs file.  To use it copy it to timezone.cfg file
   and store it in /usr/local/bin directory or ~/bin directory.

3. The other type of the configuration file uses the GMT offsets, for
   example:

        GMT+02
        GMT+01
        GMT+00
        GMT-01
        GMT-02

   In such a case timezone.wmi displays the following data:

        +02 22:50- 05-21
        +01 23:50- 05-21
        +00 00:50  05-22
        -01 01:50  05-22
        -02 02:50  05-22

   That looks in wminfo window like:

        +---------+
        |+02 22:50|
        |+01 23:50|
        |+00 00:50|
        |-01 01:50|
        |-02 02:50|
        +---------+

   The abbreviations from the first column are equal the GMT offsets.

   You will find the configuration file in that format in
   timezone.cfg.GMT.offsets file.  To use it copy it to timezone.cfg file
   and store it in /usr/local/bin directory or ~/bin directory.

4. The more complicated configuration file uses the same GMT offsets with
   the military zones names abbreviations in the second column (the third
   column is ignored by the plugin), for example:

        GMT+02		O	Oscar Time Zone (Fernando de Noronha, Pernambuco, Brazil)
        GMT+01		N	November Time Zone (Praia, Cape Verde)
        GMT+00		Z	Zulu Time Zone (Reykjavik, Iceland)
        GMT-01		A	Alpha Time Zone (Algiers, Algeria)
        GMT-02		B	Bravo Time Zone

   In such a case timezone.wmi displays the following data:

        O 22:50- 05-21
        N 23:50- 05-21
        Z 00:50  05-22
        A 01:50  05-22
        B 02:50  05-22

   That looks in wminfo window like:

        +---------+
        |O 22:50- |
        |N 23:50- |
        |Z 00:50  |
        |A 01:50  |
        |B 02:50  |
        +---------+

   The abbreviations from the first column are the same as the labels from
   the second column of timezone.cfg file -- they correspond to the military
   zone names such as: Oscar, November, Zulu, Alpha, and Bravo.  The - sign
   marks the past dates and the + sign marks the future days (referenced to
   your time zone).

   You will find the configuration file in that format in
   timezone.cfg.GMT.CODES file.  To use it copy it to timezone.cfg file and
   store it in /usr/local/bin directory or ~/bin directory.

                                      *
                                    *   *

After including a new setting in the timezone.cfg file you can test it using
the following site:

    http://www.timeanddate.com/library/abbreviations/timezones/

The configuration files using two-letters ISO codes or military zone names
result in a compact mode of the presentation of the data that is laconic in
the case of the time zones names but it displays - and + signs to mark the
hours from yesterday and tomorrow. So you do not have to analyze the
information or to scroll the text in order to know the dates assuming you
know the date in your time zone.

As for the date representation you can use different formats such as
"MM-DD", "DD.MM", "DD MM" etc. after setting the DateFormat variable in the
configuration section of the plugin.  The valid setting consists of MM for
month, DD for day, and the separator between MM and DD.  The separator is
the single character such as dash, dot, space etc.

When you use the timezone.wmi plugin with wminfo you do not need usually
more than five time zones stored in the timezone.cfg configuration file.  To
save the CPU power comment the unnecessary entries or remove them.  To
ignore the entry you have to put the comment mark at the beginning of the
line.

The timezone script edits timezone.cfg configuration file.  Instead of
putting the timezone.cfg configuration file in /usr/local/bin directory it
is more convenient to put it in ~/bin directory.  In such a case you can
edit that file without root privileges and you can store in that file the
time zones you are interested in.

The timezone.cfg.GMT.* configuration files are useful when you are
interested in the military or nautical time zones.

                                      *
                                    *   *

If you live close to the International Date Line and you would like to know
the time and the date on the opposite side of that line the date will differ
from your local date by two days from 10:00 GMT to 10:59 GMT.

Let us take into consideration three locations: Kiribati, Ghana, and Niue.
Kiribati borders the International Date Line at its easternmost point --
there the new day becomes.  Ghana uses GMT time.  Niue lies on the opposite
side of the International Date Line than Kiribati.

The timezone.cfg configuration file for these three locations is the
following:

    Pacific/Niue            NU      (Niue)
    Africa/Accra            GH      (Ghana)
    Pacific/Kiritimati      KI      (Kiribati -- International Date Line)

If it is 10:00 GMT and you live in Kiribati the timezone.wmi plugin displays
the following data:

    NU 23:00= 05-25
    GH 10:00- 05-26
    KI 00:00  05-27

That looks in wminfo window like:

    +---------+
    |NU 23:00=|
    |GH 10:00-|
    |KI 00:00 |
    |         |
    |         |
    +---------+

If it is 10:00 GMT and you live in Niue the timezone.wmi plugin displays the
following data:

    NU 23:00  05-25
    GH 10:00+ 05-26
    KI 00:00# 05-27

That looks in wminfo window like:

    +---------+
    |NU 23:00 |
    |GH 10:00+|
    |KI 00:00#|
    |         |
    |         |
    +---------+

As always the - sign marks yesterday dates and the + sign marks tomorrow
dates.  As for = and # signs think about = as of two - signs: one above the
other, and think about # as of two + signs: one intersecting the other.  So
the = sign marks the day before yesterday dates and the # sign marks the day
after tomorrow dates.

