+ 6
How to get time from different time zone in JavaScript?
I'm going to make a countdown of an incoming event from a specific country. (Manila Philippines) I need to get the current time from that country that will be shown from different computer in different country.
3 odpowiedzi
+ 10
1. Timezone
date.toLocaleTimeString('PST');
demo :
https://code.sololearn.com/Wo8XH7e7onUH/?ref=app
ref : the date method
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString
ref 2 : timezone name
https://en.m.wikipedia.org/wiki/Philippine_Standard_Time
2. Event time
date string
demo :
https://code.sololearn.com/WqEsJ6bP48gm/?ref=app
ref :
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
+ 1
Thank you so much
0
get_time_from_different_time_zone(); :-):-):-):-)