Timezone shifting - format dates according to locations in a certain date

67 views
Skip to first unread message

Diogo Resende

unread,
Oct 2, 2012, 11:20:11 AM10/2/12
to nod...@googlegroups.com
Hi,

I think this is essential to anyone. Some people already faced this problem, some probably never heard of it but it's there.

I use MomentJS [1] to format and node-time [2] to do find the timezone offset.


It works perfectly (I think...) so I wanted to share with anyone interested. If someone has a better or simpler way of doing this please tell me :)



-- 
Diogo Resende

Mikeal Rogers

unread,
Oct 2, 2012, 11:21:27 AM10/2/12
to nod...@googlegroups.com
i used timezone to do offsets and formatting because it's pure js and doesn't have any compiled dependencies like node-time.

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Diogo Resende

unread,
Oct 2, 2012, 11:26:53 AM10/2/12
to nod...@googlegroups.com
Are you talking about timezone-js? I want this server side, not client side.

-- 
Diogo Resende

Jeff Barczewski

unread,
Oct 2, 2012, 12:14:23 PM10/2/12
to nod...@googlegroups.com
I believe Mikeal is referring to the npm module timezone

npm info timezone # gives you all the package.json info which points you to homepage and source



From the wiki page, timezone runs on server and client.

Diogo Resende

unread,
Oct 2, 2012, 2:27:27 PM10/2/12
to nod...@googlegroups.com
I was looking for something like that, google search didn't show me that. But node-time seems to do what I want for now, at least until momentjs support this.

Thank you

-- 
Diogo Resende

Reply all
Reply to author
Forward
0 new messages