Import third party libraries to use in modules

18 views
Skip to first unread message

chadgw...@gmail.com

unread,
Dec 9, 2017, 3:51:15 AM12/9/17
to ImSmart.tech
I want to write a module which is able to get the current date/time and convert it to my local time zone for logging. Typically I use moment.js to handle all tricky rules around DST. Is there a way to do this?

Paul Dubé

unread,
Dec 9, 2017, 8:43:33 AM12/9/17
to ImSmart.tech
Take a look at ImSmart.localTime() https://www.imsmart.tech/Content/ProgrammersGuide.html
It returns a Javascript Date object of your local time. It will handle all tricky rules around DST. I think that's what you need. 

Let me know if it works.

Paul

chadgw...@gmail.com

unread,
Dec 12, 2017, 1:53:34 AM12/12/17
to ImSmart.tech
Thank you! This looks like exactly what I need. 
Reply all
Reply to author
Forward
0 new messages