Why does Typst CLI in nix-shell give the wrong datetime?

Hi all,

I am using NixOS and when I open “nix-shell -p typst” and type in

//test.typ
#datetime().today().display()

and use the command “typst compile test.typ” it displays “1979-12-31”

but when I use “tinymist compile test.typ” it displays the correct date.

What gives? Shouldn’t typst and tinymist use the same system inputs?

Best,
Vatsa

Hi. This is a Nix issue: typst: datetime.today() always return 1980-01-01 · Issue #374125 · NixOS/nixpkgs · GitHub.

unset SOURCE_DATE_EPOCH
1 Like