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

HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...iso 8601 date formats for everythingiso 8601 date formats for everything
Previous
 
Next
New Post
11/17/2009 5:02 AM
 

we adopted the iso 8601 date format for short dates a long time ago and all our non-DNN sites use it. How do i get a DNN site to use "yyyy-mm-dd" for all ToShortDateString() items?

My http module (which works just fine on asp.net sites) seems to be overridden somewhere by DNN back to the locale short date " eg. mm/dd/yyyy" sometime after it has been set correctly.

 
New Post
11/17/2009 5:19 AM
 

you need t modify source of the modules to add proper format specifications when formatting dates, and I am not sure, if this is the most friendly option to present dates to your visitors from around the world.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
11/17/2009 7:48 AM
 

Modify the source of every module that is used by DNN sounds extreme to me. It is also time-consuming and high maintenance. Iso 8601 is the date format stand and internationally.

I was thinking about some way of handling the Page.OnInit event so I don't need to modify the source of PageBase where this happens.

 
New Post
11/17/2009 10:02 AM
 

sorry, formatting is handled inside the modules.you might create a custom culture "en-ISO" for your server with appropriate date format and dates should be formatted accordingly.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
11/18/2009 3:59 AM
 

I didn't understand that as the server locale is ignored by DNN.

Anyway, for now I have added the code I need to the code-behind of the default.aspx page in the Init event handler making sure it runs after the init handler of PageBase which sets up the Culture for the current thread.

        Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

            ' set global page settings
            InitializePage()

	<snip lots of code />

            ' ClientCallback Logic
            DotNetNuke.UI.Utilities.ClientAPI.HandleClientAPICallbackEvent(Me)
            ' My code to force short date format to iso 8601
	   Utilities.Dateformats.ForceDefaultShortDateformat()

        End Sub

This seems to work although it has the downside that I now have a non-standard dnn installation. not too hard to maintain, but I was hoping to do this via an httpModule to avoid doing this type of change.

Thanks for you comments.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...iso 8601 date formats for everythingiso 8601 date formats for everything


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