-
Notifications
You must be signed in to change notification settings - Fork 42
Timezone override #338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
andreasknoepfle
merged 10 commits into
bitcrowd:main
from
CaseyInHaengsin:timezone_override
Mar 4, 2025
Merged
Timezone override #338
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5f598aa
add typespec for timezone
CaseyInHaengsin c3aa322
Add set_timezone call
CaseyInHaengsin ccdd7da
Test setting a timezone
CaseyInHaengsin 814d859
Update typespecs
CaseyInHaengsin a92e27b
update call
CaseyInHaengsin fc3cfc6
update test
CaseyInHaengsin 754dd67
Updated changelog
CaseyInHaengsin 55c3aab
update spec to correct name
CaseyInHaengsin 7f59d3e
remove offline opt in test
CaseyInHaengsin 9bc6776
Update CHANGELOG.md
CaseyInHaengsin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| ## Unreleased | ||
|
|
||
| ### Added | ||
|
|
||
| - :timezone to navigation protocol | ||
|
|
||
| ## [1.17.0] - 2024-08-09 | ||
|
|
||
| ### Changed | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -394,6 +394,25 @@ defmodule ChromicPDF.PDFGenerationTest do | |
| end | ||
| end | ||
|
|
||
| describe "timezone can be set thru print_to_pdf/2" do | ||
| setup do | ||
| start_supervised!({ChromicPDF, offline: false}) | ||
|
||
| start_supervised!(TestServer.bandit(:http)) | ||
|
|
||
| %{port: TestServer.port(:http)} | ||
| end | ||
|
|
||
| @tag :disable_logger | ||
| test "timezone can be set", %{port: port} do | ||
| input = {:url, "http://localhost:#{port}/timezone_echo"} | ||
|
|
||
| print_to_pdf(input, [timezone: "America/New_York"], fn text -> | ||
| text = text |> String.trim() |> Jason.decode!() | ||
| assert text == %{"timezoneId" => "America/New_York"} | ||
| end) | ||
| end | ||
| end | ||
|
|
||
| describe "certificate error handling" do | ||
| setup do | ||
| start_supervised!(ChromicPDF) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.