# Tcl's TimeZoneinfo in NixOS

**URL:** https://discourse.nixos.org/t/tcls-timezoneinfo-in-nixos/30320
**Category:** Help
**Created:** [July 11, 2023, 9:12pm UTC](https://discourse.nixos.org/t/tcls-timezoneinfo-in-nixos/30320 "2023-07-11T21:12:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![czan](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/c/4bbf92/32.png) [@czan](https://discourse.nixos.org/u/czan)
#### Post date: [July 11, 2023, 9:12pm UTC](https://discourse.nixos.org/t/tcls-timezoneinfo-in-nixos/30320/1 "2023-07-11T21:12:53Z")

</div>

My NixOS:

```tcl
eltclsh > nixos-version 
23.11pre497256.86a9533155e (Tapir)

```

I have installed Tcl, and trying to do

```auto
eltclsh > set t [clock scan {2004-10-30 05:00:00} \
-format {%Y-%m-%d %H:%M:%S} \
-timezone :America/New_York]
time zone ":America/New_York" not found

```

[Here](https://wiki.tcl-lang.org/page/timezone) I found that:

> The current set of places where tcl will try to find Olson files is:
> 
> ```auto
> /usr/share/zoneinfo
> /user/share/lib/zoneinfo
> /user/lib/zoneinfo
> /user/local/etc/zoneinfo
> C:/Progra~1/cygwin/usr/local/etc/zoneinfo
> 
> ```

But in my NixOS there is only `/etc/zoneinfo`. What can I do for fixing that problem?

---

<div class="post-metadata">

### Author: ![czan](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/c/4bbf92/32.png) [@czan](https://discourse.nixos.org/u/czan)
#### Post date: [July 12, 2023, 8:33pm UTC](https://discourse.nixos.org/t/tcls-timezoneinfo-in-nixos/30320/2 "2023-07-12T20:33:03Z")

</div>

An ugly workaround is to make an symlink to `/etc/zoneinfo`:

```auto
> sudo mkdir /usr/share/
> sudo ln -s /etc/zoneinfo /usr/share/zoneinfo
eltclsh > set t [clock scan {2004-10-30 05:00:00} \
-format {%Y-%m-%d %H:%M:%S} \
-timezone :America/New_York]
1099126800

```

But it is not the NixOS way. How can I create an symlink by `/etc/nixos/configuration.nix`?

---

<div class="post-metadata">

### Author: ![aanderse](https://discourse.nixos.org/user_avatar/discourse.nixos.org/aanderse/32/1420_2.png) [@aanderse](https://discourse.nixos.org/u/aanderse)
#### Post date: [July 12, 2023, 10:27pm UTC](https://discourse.nixos.org/t/tcls-timezoneinfo-in-nixos/30320/3 "2023-07-12T22:27:38Z")

</div>

As a quick fix it seems like the `tcl` package should be patched to include our location instead. Adding our location [here](https://github.com/tcltk/tcl/blob/cbbe0ee5ad3110492f30527421e4d06767015eaa/library/clock.tcl#L249) seems like it might do the trick.

A better long term solution would be to work with upstream to get our path added to that list… though `tcl` releases aren’t that common these days, so maybe I’m being idealistic by saying this 😆

---

<div class="post-metadata">

### Author: ![akho](https://discourse.nixos.org/user_avatar/discourse.nixos.org/akho/32/10144_2.png) [@akho](https://discourse.nixos.org/u/akho)
#### Post date: [July 16, 2023, 6:56pm UTC](https://discourse.nixos.org/t/tcls-timezoneinfo-in-nixos/30320/4 "2023-07-16T18:56:05Z")

</div>

> [@aanderse](#):
>
> A better long term solution would be to work with upstream to get our path added to that list…

You can’t get a store path into upstream.

I’ve started an [issue](https://github.com/NixOS/nixpkgs/issues/243831) and a [PR](https://github.com/NixOS/nixpkgs/pull/243838) to fix; please like, subscribe, and review, thx.

---

<div class="post-metadata">

### Author: ![aanderse](https://discourse.nixos.org/user_avatar/discourse.nixos.org/aanderse/32/1420_2.png) [@aanderse](https://discourse.nixos.org/u/aanderse)
#### Post date: [July 16, 2023, 10:22pm UTC](https://discourse.nixos.org/t/tcls-timezoneinfo-in-nixos/30320/5 "2023-07-16T22:22:35Z")

</div>

The original post stated we have a stable path under `/etc`.

🤷‍♂️
