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

Adding in support for generating an ISO8601 datetime string that includes milliseconds #19

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

Conversation

danrivett
Copy link

Probably not the best way to implement this, but this change is backwards compatible and unblocked me as I needed a genuine ISO8601 datetime string that included milliseconds - e.g. calls Date.toISOString() - as currently the 'iso' format leaves that off which makes it unsuitable for certain use cases.

For backwards compatibility this commit adds this in if a new 'isoSS' format is specified.

Submitting this PR in case it helps anyone else.

…udes milliseconds - e.g. calls Date.toISOString() as currently the 'iso' format leaves that off which makes it unsuitable for certain use cases. For backwards compatibility this commit adds this in if a new 'isoSS' format is specified.
@danrivett
Copy link
Author

danrivett commented Mar 19, 2021

Key here is I needed the date not only to be generated with millisecond precision, but also to be generated in the UTC timezone, not my local timezone. I couldn't figure out a way to achieve both of those things without this change.

Please close this PR if this change is unnecessary and there is an existing way to achieve this.

@danrivett
Copy link
Author

Bumping this as just installed your plugin on my new machine and wondered why it wasn't working - I forgot I installed my fork last time.

Be great to get this merged in. I just confirmed it still works by manually editing the ~/.vscode/extensions/jsynowiec.vscode-insertdatestring-2.3.1/out/src/extension.js file with these changes.

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.

1 participant