I am trying to create two clocks on a website that says two times on it. One from London and the other from New York.
I have been able to create a clock that reads t
To do this properly, you will need a time zone database, such as one of the ones I listed here.
All of the other answers to this question are making the mistake in thinking that a "time zone" and a "time zone offset" are the same thing. They are not. For example, the time zone for London is Europe/London, which can have either a +0 or +1 offset depending on what time of year it is. The time zone for New York is America/New_York, which can have either a -5 or -4 offset based on a completely different set of dates than London.
You might want to look at moment-timezone:
moment().tz("America/New_York").format()