enonic / app-rss

Apache License 2.0
2 stars 6 forks source link

Better handling of timezone config on dateTime for publishDate field #9

Closed Bellfalasch closed 7 years ago

Bellfalasch commented 7 years ago

When adding the pubDate node in RSS we don't handle timezones in a good way. This is needed for 1.0 release. It should detect datetime format and act accordingly.

pvmerlo commented 7 years ago

To work with dateTime on all solutions that I'm inserted, I'm using moment.js and moment-timezone. This is a huge-spread lib that many javascript developers like. As it's very stable, I think it should be a good one to use on this app. I'm making some tests with the rss feed and soon I'll commit my changes to you check if it's ok for the v1.0 :)

pvmerlo commented 7 years ago

A new field on the RSS Page content type could be added to use user-seted timezone (with UTC+0 as default). That way, if my application rss serves from Oslo for example, I could use "Europe/Oslo". A full list of timezones could be added to the main documentation to help users how to find the correct one for the app. Ref: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Bellfalasch commented 7 years ago

I've merged current things for 0.12.0, not released yet. I don't see why this setting is needed, nor why moment is added manually (we have a lib for it on Market). After hearing back from you I can fix final things and release new version. Other changes are merged and they work very well, thx! =)

Bellfalasch commented 7 years ago

Conclusion here (from another thread) is to do this (I can do this during the week):

Bellfalasch commented 7 years ago

This is now working properly