Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsTime and Date format?Time and Date format?
Previous
 
Next
New Post
8/29/2008 5:50 AM
 

Hi!

I have just installed the News module version 4.0.0, and I really like the new features. However, I cannot fint a way to use my local Time & Date format for the module. I am using a Swedish language pack. Any suggestions?

Regards, Oskar

 
New Post
9/1/2008 7:00 AM
 

Hi Oskar,

The dates you see are a result of the standard output of Rss which is RFC 822 compliant. This standard was written by Americans and as a result the date format is not very universal. The date is output directly to screen using the XSL transformation that you specify (there is a default one). If you want to transform the date format you'll need to dive into XSL transformations and add some XSL code that parses and transforms the date. O'Reilly's XSLT cookbook has the code to do this.

Peter


Peter Donker
Bring2mind http://www.bring2mind.net
Home of the Document Exchange,
the professional document management solution for DNN
 
New Post
9/2/2008 5:28 AM
 

I also have same problem. Rss feeds gives date in "Mon, 01 Sep 2008" format. I should make in "2008.9.1" format.

Does anybody have example XSL code for me? 

 
New Post
9/6/2008 2:54 PM
 

Not sure why folks want to change the pubDate format given in a newsfeed.  I have nothing but trouble when I try to base anything on pubDate.  I can understand the desire to show feeds with localized date/time, but seems like a whole lot of trouble to go through.  My experience with most feeds generated is that they don't even reflect correct information in about 80% of the usage I've seen.  The discrepency usually can be attributed to developers not understanding how to correctly use date/time fields and convert them, and the further complication of date/times being formatted in databases based on the server date/time setup, which may not be correctly setup or maintained.

It's really puzzling to me how RSS specs decided to use the RFC822 date/time format in the first place.  This was a standard developed for first gen email text messages.  Peter's correct in that it was an American originated spec, but it did have a group of international folks working on it, which is why the format doesn't even match American date formats either. 

Now, you can change the format using XSL, but it's a real chore to provide a solution that's universal and fully globalized.  Most solutions are going to be local solutions as far as I can tell.  I've done a bit of that stuff, but reverted back to not caring about it because most feeds don't always give you pubDate in the rfc822 format, and trying to figure out universal routines to deal with all the variances of gloablized date/time formats is difficult to say the least.   So, I just take it as it is - much like the content in a feed. 

I don't even like to validate the pubDate format because I'd rather worry about getting the content than stressing over whether the pubDate is valid and miss displaying the content.  Maybe I'm funny that way, but my usage of feeds is not based on pubDate, and if I choose to cache, I think the better approach would be to simulate a ttl element based on the date/time I pulled the feed originally.  I can display the pubDate as given, and still have control over timing for feed retrieval and display.  Just my thoughts... 

 

 
New Post
9/6/2008 3:53 PM
 

Well put, Phil. The others need to realize the date transformation is pretty horrible in XSL. If the date were universal format it'd be easier, but the IETF in their infinite wisdom used this format in the very earliest of protocols.

I can imagine doing one thing though: RSS allows extending. I use this on my DMX module. I can add more data if I put it in my own namespace. This can be used by the XSL. So what would be a nice enhancement is to put a parsed date in universal format in a separate field and make the XSL more flexible to using this instead of the default date. Once there is a universal date people can put it in their own format as the transformation is no longer very difficult.

Peter


Peter Donker
Bring2mind http://www.bring2mind.net
Home of the Document Exchange,
the professional document management solution for DNN
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsTime and Date format?Time and Date format?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out