Moment timezone in Meteor

Does anyone know if momentjs:meteor also includes Moment Timezone? From here I would venture that the answer is no.

It looks like it doesn’t, and moment-timezone is currently in a jumble of packages from different authors. Would be nice to get some confirmation from people who are using timezone and what package (if any) they are using.

2 Likes

We have been using the following in production
mrt:moment
mrt:moment-timezone
joshowens:timezone-picker

1 Like

What’s further disappointing is getting moment, timezone and locale support all together and at their latest versions since some way or another one depends on the other and it is virtually impossible to achieve it.

1 Like

mrt:moment hasn’t been updated in quite some time.

momentjs:moment is the officially supported package, but doesn’t seem to have any way to add timezone.

2 Likes

yeah the lack of timezone support is the reason why we don’t use the official moment package

Any news on this?

I just stumbed upon incompability issues between

'mrt:moment-timezone@0.2.1',  // https://atmospherejs.com/mrt/moment-timezone
'momentjs:moment@2.10.6',  // https://atmospherejs.com/momentjs/moment
'rzymek:moment-locale-de@2.9.0',  // https://atmospherejs.com/rzymek/moment-locale-de

adding mrt:moment-timezone@ to the stack destroys the “to()” moment().to().

Damn - how did you guys solve this?

Use the npm package : https://www.npmjs.com/package/moment-timezone

4 Likes

Can you tell us the proper import for the npm package, I’m not getting it right?

The npm package includes the base code for momentjs, so no need to import this seperately. I am running Meteor 1.3, so am using:

import moment from 'moment-timezone';

then using it like this:

moment(someDate).tz('Europe/London').format('L');

3 Likes