Skip to content

Commit

Permalink
custom widget - deployed timestamp with timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
JMach1 committed Sep 14, 2022
1 parent 402620f commit be22315
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts.v2/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function listFilesInDirectory(dir) {
}

/**
* Attempts to get a develoer portal storage connection string in two ways:
* Attempts to get a developer portal storage connection string in two ways:
* 1) if the connection string is explicitly set by the user, use it.
* 2) retrieving the connection string from the management API using the instance endpoint and SAS token
* @param {string} managementApiEndpoint the management endpoint of service instance
Expand Down
4 changes: 1 addition & 3 deletions src/components/custom-widget-list/createWidget.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@
<!-- ko if: !!$component.config -->
<p style="margin: 0;">
Last deployed<br/>
<!-- TODO Intl.DateTimeFormat(new Date(config.deployedOn)).resolvedOptions().timeZone -->
<!-- ko if: !!$component.config.deployedOn -->
<span data-bind="text: new Date(config.deployedOn).toLocaleString()"></span><br/>
<i data-bind="text: `(${new Date(config.deployedOn).toTimeString().match(/\((.+)\)/)[1]})`"></i>
<span data-bind="text: new Date(config.deployedOn).toLocaleString(undefined, {timeZoneName: 'short'})"></span><br/>
<!-- /ko -->
<!-- ko if: !$component.config.deployedOn -->
<span>The widget hasn't been deployed yet.</span>
Expand Down

0 comments on commit be22315

Please sign in to comment.