# Timezone name not showing



## rihad (Jan 18, 2017)

Hello, all. On a newly installed 10.3-RELEASE-p11 (actually it's a VPS):

`$ date`
Wed Jan 18 22:32:47 +04 2017

whereas our local timezone name AZT should be shown.

`$ cat /var/db/zoneinfo`
Asia/Baku

Running `tzsetup -r` doesn't solve the issue, or just `tzsetup`, which brings up a standard timezone selection menu, can't display timezone name either it asks in the end "does the abbreaviation +04 look reasanoble" instead of a timezone name I've been seeing for years. What's going on?

`$ file /usr/share/zoneinfo/Asia/Baku`
/usr/share/zoneinfo/Asia/Baku: timezone data, version 2, 10 gmt time flags, 10 std time flags, no leap seconds, 68 transition times, 10 abbreviation chars


----------



## aribi (Jan 18, 2017)

Shouldn't Asia/Baku have -04 instead of +04?
Don't know how or from which media came your new install, but timezone info is simple:
/etc/localtime is a copy of the file you mentioned for your `tzsetup`, so

```
cmp /etc/localtime /usr/share/zoneinfo/Asia/Baku
```
should not show any differences.
Also you could try from the other end. Check from source if your timezone file is OK:

```
cd /usr/src/share/zoneinfo
make
cmp /usr/obj/usr/src/share/zoneinfo/builddir/Asia/Baku /usr/share/zoneinfo/Asia/Baku
```

BTW. Perhaps your government is seeking real integration with the western hemisphere since 10.2-p9


----------



## rihad (Jan 20, 2017)

Our local timzone is GMT+4, Azerbaijan is situated to the East of Greenwich. /etc/localtime is identical to the stock Asia/Baku timezone file. And to the freshly built one, too. At least some timezone name should be displayed in place of +04. But neither one does. The computer in question is a Digital Ocean VPS running FreeBSD 10.3-RELEASE, freebsd-updated to 10.3-RELEASE-p11. It's basically identical to a RELEASE, except for a couple of custom rc files in /etc that don't look like they do anything with dates. There's also a python script (bsd-cloudinit). I've never witnessed this problem on any "normally" installed FreeBSD release.


----------



## getopt (Jan 20, 2017)

First of all FreeBSD does not make the timezone files. Data and/or binaries come from http://www.iana.org/time-zones


```
> zdump America/Chicago
America/Chicago  Fri Jan 20 12:19:36 2017 CST
> zdump Asia/Baku
Asia/Baku  Fri Jan 20 22:20:01 2017 [b]+04[/b]
```
This confirms rihad observations.

See zic(8) for compiling a timezone binary file. It has examples.

If you want to see the source what IANA has, get http://www.iana.org/time-zones/repository/releases/tzdb-2016j.tar.lz

Also see https://en.wikipedia.org/wiki/Time_in_Azerbaijan for discontinued summer time in 2016. 

From file tzdb-2016j/asia:

```
# Azerbaijan                                                                                                             
 126                                                                                                                          
 127 # From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23):                                                      
 128 # According to the resolution of Cabinet of Ministers, 1997                                                              
 129 # From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17).                                                  
 130 # [URL]http://code.az/files/daylight_res.pdf[/URL]                                                                                  
 131                                                                                                                          
 132 # From Steffen Thorsen (2016-03-17):                                                                                     
 133 # ... the Azerbaijani Cabinet of Ministers has cancelled switching to                                                    
 134 # daylight saving time....                                                                                               
 135 # [URL]http://www.azernews.az/azerbaijan/94137.html[/URL]                                                                           
 136 # [URL]http://vestnikkavkaza.net/news/Azerbaijani-Cabinet-of-Ministers-cancels-daylight-saving-time.html[/URL]                      
 137 # [URL]http://en.apa.az/xeber_azerbaijan_abolishes_daylight_savings_ti_240862.html[/URL]                                            
 138                                                                                                                          
 139 # Rule  NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    LETTER/S                                         
 140 Rule    Azer    1997    2015    -       Mar     lastSun  4:00   1:00    S                                                
 141 Rule    Azer    1997    2015    -       Oct     lastSun  5:00   0       -                                                
 142 # Zone  NAME            GMTOFF  RULES   FORMAT  [UNTIL]                                                                  
 143 Zone    Asia/Baku       3:19:24 -       LMT     1924 May  2                                                              
 144                         3:00    -       +03     1957 Mar                                                                 
 145                         4:00 RussiaAsia +04/+05 1991 Mar 31  2:00s                                                       
 146                         3:00 RussiaAsia +03/+04 1992 Sep lastSun  2:00s                                                  
 147                         4:00    -       +04     1996                                                                     
 148                         4:00    EUAsia  +04/+05 1997                                                                     
 149                         4:00    Azer    +04/+05
```

With this you should be able to insert Azerbaijan Time abbreviation AZT and compile it.


----------



## rihad (Jan 20, 2017)

Thanks a lot for the thorough answer!


----------

