javascript - Create a momentjs in a timezone different from server? -


Where is my server / OS independent ...

  1. How can I specify 5:00 "Australia / Sydney" and see it in GMT?
  2. How can I tell "America / New York" at 5 o'clock and see it in GMT?

    How can I find the difference between 1) and 2) For example in minutes, I hope this difference will be changed throughout the year because active in Sydney or New York it happens. ">

    Here's the solution:

      var startDay = moment.utc (" 2013-06-02 "); // Sunday (day ago) GMT var startOffset = moment.utc ( Startday) .add ("hours", 15) .tz ("Australia / Sydney"). Area (); // 15:00 hrs == -660 // 16:00 pm == -600 // IN GMT var StartUTCC = moment.utc (startDay) .add ('min', 1740) .add ("min", start); var endady = moment (startup) .add ('day', 5); //moment.utc ("2014-03-10"); // Friday GMT var endOffset = moment.utc (endDay) .add ("hour", 7) .tz ("America / New_York"). Area (); var endUTC = moment .utc (and day) .add ('min', 1020) .add ("min", endoffet);    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -