Skip to content

Commit 3d7b5d7

Browse files
authored
Merge pull request #306 from gautam-paladiya/patch-1
Update - How do you convert date to another timezone in javascript
2 parents 17fb078 + db40f13 commit 3d7b5d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3330,7 +3330,7 @@
33303330
You can use the toLocaleString() method to convert dates in one timezone to another. For example, let's convert current date to British English timezone as below,
33313331
33323332
```javascript
3333-
console.log(event.toLocaleString("en-GB", { timeZone: "UTC" })); //29/06/2019, 09:56:00
3333+
console.log(new Date().toLocaleString("en-GB", { timeZone: "UTC" })); //29/06/2019, 09:56:00
33343334
```
33353335
33363336
**[⬆ Back to Top](#table-of-contents)**

0 commit comments

Comments
 (0)