1

I am looking for a function to convert UTC timestamp to another timezone timestamp.

It needs two parameters,

utcTimestamp(1464891132) & timezoneString("Asia/Kolkata")

function convertToTimeZone(utcTimestamp, timezoneString) {
      //do some operations and  
    return "timestamp in given timezone";
}

I just checked link and found that there are some js libs, which solve that conversion problem, but now my problem is how can I import third party js to my mongoJS.

Or is there any patch or alternative to solve these problem in mongojs?

FYI I am using mongoJS from mongoshell....

Stennie
  • 63,885
  • 14
  • 149
  • 175
piyushmandovra
  • 4,219
  • 3
  • 19
  • 30

0 Answers0