Moment TimeZone change

Keshav Gautam
Oct 8, 2021

--

var london = moment.tz(‘2021–10–08 11:14:23’, ‘Europe/London’);

console.log(london.format(‘MMMM Do YYYY, h:mm:ss a’));

var india = london.clone().tz(“Asia/Kolkata”);

console.log(india.format(‘MMMM Do YYYY, h:mm:ss a’));

var a = moment.tz(‘2021–10–08 11:14:23’, ‘Europe/London’).clone().tz(“Asia/Kolkata”).format(‘MMMM Do YYYY, h:mm:ss a’)

console.log(a);

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Keshav Gautam
Keshav Gautam

No responses yet

Write a response