-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timezone support in the future? #39
Comments
Hi, How do you set it up for the timezone with angular1 ? |
I think the following post will explain better the solution than my word: http://stackoverflow.com/questions/25283901/how-to-set-angular-moment-timezone-globally |
@urish I'm also interested. I noticed in your angular-moment package you actually give an explanation on how to use moment**'-timezone**: https://github.com/urish/angular-moment Also, does moment actual support half / three-quarter time zones? |
I am also looking for a locale timezone supported feature. Currently when I use |
Same problem here, and now, after updating moment, I can't even set the global locale, that sucks |
I found a workaround, if the date to be parsed contains timezone information. You can make a custom Angular pipe that just parses the string using moment.parseZone(), then add that pipe before amDateFormat (or whatever pipe you're using). |
@rdicroce you may want to contribute this pipe in a PR so everyone can enjoy it |
@urish I'm building my app using straight JavaScript rather than TypeScript. The pipe's really simple though, so you shouldn't have any problem porting it to TS: var ngCore = require('@angular/core');
var moment = require('moment');
exports.MomentParseZonePipe = ngCore.Pipe({
name: 'momentParseZone'
})
.Class({
constructor: function () {},
transform: function (value) {
return moment.parseZone(value);
}
}); |
can we override to |
Related: moment/moment-timezone#385 |
Yes, moment-timezone supports the entire IANA time zone database, including strange oddities like |
@mj1856 When this issue will be fixed? |
Up |
In the meantime you can set the default with: |
Is there any way to use timezone in Angular 2 with pipes? |
Can we have some information here ? I can't set the timezone manually.. it will not work in pipes. |
Hi! |
@BenDevelopment just copy it to your project / or fork it on github. It's easy to achieve. Just redefine this.lastText with: |
Any word on this? I have objects with full time/zone information |
where in angular is the most appropriate place to set this |
+1 |
Thanks for the work of this lib.
Will timezone feature support in the future? Ideally, we can set timezone once instead of passing the timezone setting every time we used this lib.
Currently, if the input is "2016-05-23T00:39:23.610812Z" and the local time is 21:39, this lib does not show correctly because time zone feature has not been implemented. In Angular 1, everything is fine.
Thanks.
The text was updated successfully, but these errors were encountered: