Skip to content

Conversation

@matthewlamperski
Copy link
Contributor

Reformatted date strings received from Canvas to account for a difference in timezone. This version will create a new ISO date string that considers the user's timezone, and forwards this new ISO time string to Notion, resulting in the correct time being presented to the user. This method uses the timezone that the machine is operating on. So if the user provides a timezone different from the one they are in, for some reason, the time that will go into Notion will be in accordance with the timezone their machine is currently in (i.e. using JavaScript's Date functionality), not the timezone they have manually entered.

…ence in timezone. This version will create a new ISO date string that considers the user's timezone, and forwards this new ISO time string to Notion, resulting in the correct time being presented to the user. This method uses the timezone that the machine is operating on. *So if the user provides a timezone different from the one they are in*, for some reason, the time that will go into Notion will be in accordance with the timezone their machine is currently in (i.e. using JavaScript's Date functionality).
@JamesNZL JamesNZL added the bug Something isn't working label Aug 29, 2022
Copy link
Owner

@JamesNZL JamesNZL left a comment

Choose a reason for hiding this comment

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

Thanks heaps! Just a tiny style change, and a question out of curiosity.

…ded timezone, then calculates the correct date string to give to Notion. Default timezone is 'Pacific/Auckland'.
Copy link
Owner

@JamesNZL JamesNZL left a comment

Choose a reason for hiding this comment

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

A few tiny changes, but looks really good 😄, thanks again!

…ne to guess the user's timezone based on their location if they did not provide a timezone.
Copy link
Owner

@JamesNZL JamesNZL left a comment

Choose a reason for hiding this comment

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

Perfect! Thank you again ✨

@JamesNZL JamesNZL merged commit 2ed29fe into JamesNZL:main Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

2 participants