Skip to content

Update World::today() in tests to mimic CLI - #7853

Merged
laurmaedje merged 2 commits into
typst:mainfrom
t-rapp:tr-today-offset-tests
Feb 16, 2026
Merged

laurmaedje merged 2 commits into
typst:mainfrom
t-rapp:tr-today-offset-tests

Conversation

@t-rapp

@t-rapp t-rapp commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Create date values in tests with a chrono-based approach that is similar to the implementation in typst-cli.

Suggested in #7691.

@t-rapp
t-rapp marked this pull request as draft February 13, 2026 07:36
Create date values in tests with a chrono-based approach that is similar
to the implementation in `typst-cli`.

Suggested in typst#7691.
@t-rapp
t-rapp force-pushed the tr-today-offset-tests branch from 87c1765 to 0836677 Compare February 13, 2026 08:06
@t-rapp

t-rapp commented Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

Have also added a commit that avoids the local timezone offset being added in CLI for reproducible builds. This was also mentioned in #7691. If considered better I can split this change into a separate PR.

@t-rapp
t-rapp marked this pull request as ready for review February 13, 2026 08:13
@laurmaedje

Copy link
Copy Markdown
Member

A separate PR would be nice. Thanks for tackling this!

@t-rapp
t-rapp force-pushed the tr-today-offset-tests branch from 0836677 to ae8d350 Compare February 13, 2026 10:08
@t-rapp

t-rapp commented Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

Moved the commit which changes when local timezone is applied to #7856.

Regarding merging the implementations for World::today() in tests and CLI, and moving it into typst-kit: That would be even better but I did not know how to approach that (where to put what helper types).

@laurmaedje

Copy link
Copy Markdown
Member

Great thanks! We can take a look at a potential typst-kit design once these changes are landed.

@laurmaedje
laurmaedje enabled auto-merge February 16, 2026 10:31
@laurmaedje

Copy link
Copy Markdown
Member

Thanks!

@laurmaedje
laurmaedje added this pull request to the merge queue Feb 16, 2026
Merged via the queue into typst:main with commit cb84490 Feb 16, 2026
8 checks passed
jassielof pushed a commit to jassielof/typst that referenced this pull request Apr 7, 2026
Dikluwe pushed a commit to Dikluwe/typst-crystalline that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants