Skip to content
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

add documentation for built in timezone config identifier #620

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jmanske
Copy link

@jmanske jmanske commented Jun 16, 2024

If there is a reason why the $tz configuration identifier isn't documented, let me know! Otherwise we should have documentation about the built-in identifiers so that people can use them. This one has been asked about on discord a few times.

Copy link

netlify bot commented Jun 16, 2024

Deploy Preview for tidbyt-dev ready!

Name Link
🔨 Latest commit e2f6da8
🔍 Latest deploy log https://app.netlify.com/sites/tidbyt-dev/deploys/666eef89567c7b00080441e9
😎 Deploy Preview https://deploy-preview-620--tidbyt-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.


local_time = time.now().in_location(timezone)
```
When using `pixlet serve` or `pixlet render`, `config.get("$tz")` will return `None`. Use a default timezone configuration when developing as in the example.
Copy link

@dtseiler dtseiler Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can test $tz with pixlet serve by passing it in on the query string in your browser, e.g. &%24tz=Europe%2FLondon

edit: Changed my example to not use the same timezone as the default in your example. :)

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