Open danrivett opened 3 years ago
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.
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.
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.