Time Zone

I'd just like to expand a bit on the use of the 'tz' boot code to specify the local time zone (including the provision of daylight saving information). Please note that this is an alternative to copying a file to '/etc/localtime' and not to be used in conjunction with that approach.

Without Daylight Saving

In the case of no daylight saving the boot code simply needs the name of the timezone and the offset to UTC. Example India:

  tz=IST-5:30    i.e. India is 5h30 "ahead" of UTC, AFAIK 'IST' stands for "India Standard Time"

With Daylight Saving

Things get a bit more varied with daylight saving. The TZ definition now also adds the name of the timezone during daylight saving and the details when daylight saving starts and ends. Example France:

tz=CET-1CEST,M3.5.0,M10.5.0/3  with the following components:
   CET                         timezone name during standard time (i.e. "Central European Time")
      -1                       offset during standard time (i.e. 1h "ahead")
        CEST                   timezone name during daylight saving (i.e. "Central European Summer Time")
              3                start of daylight saving: the month (i.e. March)
                5              the week (i.e. last)
                  0            the day (i.e. Sunday)
                     10        end of daylight saving: the month (i.e. October)
                        5      the week (i.e. last)
                          0    the day (i.e. Sunday)
                            3  the time (i.e. 03:00:00)
                                                     

Please note: Since no time is specified for the start of CEST the default value of 02:00:00 will be used.

I hope this breakdown makes it easier to understand the specification mentioned above. It's actually less intimidating once you got the general idea.

If your are still not keen to create your very own TZ string you can cheat by taking a peek in the (binary) zoneinfo files of the tzdata.tcz extension. Please note that in the following steps (using London as an example) the extension gets merely downloaded (to the home directory), extracted and right away removed again. So nothing remains afterwards. Let's face it, you probably need to find out your local TZ definition only a few times in your life (e.g. when you move or your daylight saving timeframe changes):

tc@box:~$ tce-fetch.sh tzdata.tcz
tc@box:~$ mkdir ext
tc@box:~$ sudo mount tzdata.tcz ext -t squashfs -o loop,ro,bs=4096
tc@box:~$ find ext/usr/local/share/zoneinfo -type f -name London | xargs tail -1
GMT0BST,M3.5.0/1,M10.5.0
tc@box:~$ umount ext
tc@box:~$ rm -rf ext tzdata.tcz

If you are not sure about the city to specify in the 'find' command, have a look around the files in the 'zoneinfo' directory (and it's sub-directories) and just use 'tail -1 FILE' for the FILE that best fits your needs.

From: http://forum.tinycorelinux.net/index.php?topic=5017.msg27012#msg27012

Print/export
QR Code
QR Code wiki:time_zone (generated for current page)