Timezone.convert("Etc/GMT...") inconsistent with DateTime+Tzdata
- Dominant language
- Elixir
- Stars
- 1.8k
- Forks
- 407
- PR merge metrics
- No merged PRs in 30d
Description
This is largely a duplicate of https://github.com/bitwalker/timex/issues/649, but slightly different
### Steps to reproduce
in your mix.exs:
```
defp deps do
[
{:timex,"3.7.6"},
{:tzdata, "~> 1.1"}
]
end
```
then in the console:
```
DateTime.now("Etc/GMT-4")
{:ok, #DateTime<2021-09-02 21:30:46.545885+04:00 +04 Etc/GMT-4>}
```
tried in PostgreSQL and it's consistent with DateTime + Tzdata:
```
postgres=# select now() at time zone 'Etc/GMT-4'
2021-09-02 21:30:57.241963
```
but Timex gives a very different result
```
Timex.now() |> Timex.Timezone.convert("Etc/GMT-4")
#DateTime<2021-09-02 13:31:50.793031-04:00 -04 Etc/GMT+4>
```
### Description of issue
I was executing the lines above from `Europe/Samara` in the evening, around `21:30`. My timezone is `UTC+04:00` and the corresponding Etc area is `Etc/GMT-4` (according to [tz database wiki](https://en.wikipedia.org/wiki/Tz_database#Area))

I was expecting `Timex.now() |> Timex.Timezone.convert("Etc/GMT-4")` to give me my local time (~21:30)
Contributor guide
Assessment
This issue has not been assessed yet.