Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get current time in different timezone javascript


// current datetime string in America/Chicago timezone
let chicago_datetime_str = new Date().toLocaleString("en-US", { timeZone: "America/Chicago" });

// create new Date object
let date_chicago = new Date(chicago_datetime_str);
Source by usefulangle.com #
 
PREVIOUS NEXT
Tagged: #current #time #timezone #javascript
ADD COMMENT
Topic
Name
1+8 =