# TimeZones ERROR: ArgumentError: Unknown time zone "Europe/Warsaw"

**URL:** https://discourse.julialang.org/t/timezones-error-argumenterror-unknown-time-zone-europe-warsaw/17619
**Category:** New to Julia
**Created:** [November 16, 2018, 9:04pm UTC](https://discourse.julialang.org/t/timezones-error-argumenterror-unknown-time-zone-europe-warsaw/17619 "2018-11-16T21:04:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dhazeghi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dhazeghi/32/7107_2.png) [@dhazeghi](https://discourse.julialang.org/u/dhazeghi)
#### Post date: [November 16, 2018, 9:04pm UTC](https://discourse.julialang.org/t/timezones-error-argumenterror-unknown-time-zone-europe-warsaw/17619/1 "2018-11-16T21:04:15Z")

</div>

Hello,

I’m trying to use the TimeZones package (JuliaPro 0.6.3, TimeZones 0.7.2 on Ubuntu Linux 18.04). Trying to create a timezone with any argument other than UTC fails. Any suggestions on what I am doing wrong? Thanks!

julia\> import TimeZones  
INFO: Recompiling stale cache file /home/dara/.juliapro-0.6.3.1/lib/v0.6/Compat.ji for module Compat.  
INFO: Recompiling stale cache file /home/dara/.juliapro-0.6.3.1/lib/v0.6/TimeZones.ji for module TimeZones.

julia\> TimeZones.TimeZone(“UTC”)  
UTC

julia\> TimeZones.TimeZone(“Europe/Warsaw”)  
ERROR: ArgumentError: Unknown time zone “Europe/Warsaw”  
Stacktrace:  
[1] (::TimeZones.##1#3{String})() at /juliapro/JuliaPro-0.6.3.1/JuliaPro/pkgs-0.6.3.1/v0.6/TimeZones/src/TimeZones.jl:70  
[2] get!(::TimeZones.##1#3{String}, ::Dict{AbstractString,Base.Dates.TimeZone}, ::String) at ./dict.jl:449  
[3] Base.Dates.TimeZone(::String) at /juliapro/JuliaPro-0.6.3.1/JuliaPro/pkgs-0.6.3.1/v0.6/TimeZones/src/TimeZones.jl:64

julia\> TimeZones.timezone\_names()  
ERROR: SystemError: unable to read directory /juliapro/JuliaPro-0.6.3.1/JuliaPro/pkgs-0.6.3.1/v0.6/TimeZones/deps/compiled: No such file or directory  
Stacktrace:  
[1] readdir(::String) at ./file.jl:415  
[2] timezone\_names() at /juliapro/JuliaPro-0.6.3.1/JuliaPro/pkgs-0.6.3.1/v0.6/TimeZones/src/discovery.jl:15

julia\>

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [November 16, 2018, 10:29pm UTC](https://discourse.julialang.org/t/timezones-error-argumenterror-unknown-time-zone-europe-warsaw/17619/2 "2018-11-16T22:29:48Z")

</div>

`Europe/Warsaw` is not the name of a time zone. See this list for time zones and their abbreviations:

> **[List of time zone abbreviations](https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations)**
>
> This is a list of time zone abbreviations. 
> Time zones are often represented by alphabetic abbreviations such as "EST", "WST", and "CST", but these are not part of the international time and date standard ISO 8601 and their use as sole designator for a time zone is discouraged. Such designations can be ambiguous; for example, "CST" can mean China Standard Time (UTC+8), Cuba Standard Time (UTC−5), and (North American) Central Standard Time (UTC−6), and it is also a widely used variant of ACST (Au...

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [November 16, 2018, 11:28pm UTC](https://discourse.julialang.org/t/timezones-error-argumenterror-unknown-time-zone-europe-warsaw/17619/3 "2018-11-16T23:28:34Z")

</div>

> [@StefanKarpinski](#):
>
> `Europe/Warsaw` is not the name of a time zone.

Actually it is:

> **[List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)**
>
> This is a list of time zones from release 2023c of the tz database.
> Standard Time (STD) and Daylight Saving Time (DST) offsets from UTC in hours and minutes.
> For zones in which Daylight Saving is not observed, the DST offset shown in this table is a simple duplication of the STD offset.
> The UTC offsets are based on the current or upcoming database rules. This table does not attempt to document any of the historical data which resides in the database.
> Time zone abbreviations for both Standard ...

“Europe/Warsaw” is the very first example in TimeZones’s documentation: [Types - TimeZones.jl](https://timezonesjl.readthedocs.io/en/stable/types/)

@dhazeghi Maybe you need to build the package first:

```julia
Pkg.build("TimeZones")

```

---

<div class="post-metadata">

### Author: ![dhazeghi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dhazeghi/32/7107_2.png) [@dhazeghi](https://discourse.julialang.org/u/dhazeghi)
#### Post date: [November 19, 2018, 5:21pm UTC](https://discourse.julialang.org/t/timezones-error-argumenterror-unknown-time-zone-europe-warsaw/17619/4 "2018-11-19T17:21:36Z")

</div>

Thanks @StefanKarpinski and @giordano - that does the trick! I must’ve messed up the installation some time ago because if I do Pkg.rm() and Pkg.add(), everything appears to be fine.

(In the process of testing, I also discovered that some of the timezones that the Linux ‘date’ command reports e.g. ‘PST’ are not actually recognized by the system as valid timezones - Ubuntu 18.04 only has ‘PST8PDT’. Yuck)

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [November 19, 2018, 7:21pm UTC](https://discourse.julialang.org/t/timezones-error-argumenterror-unknown-time-zone-europe-warsaw/17619/5 "2018-11-19T19:21:47Z")

</div>

Not sure I deserve any thanks on this one—my only contribution was misinformation 😬
