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 ForumsGalleryGalleryLocalization - date conversionLocalization - date conversion
Previous
 
Next
New Post
12/20/2005 5:29 PM
 

Being a Brit, my site has to deal with dates in both US and GB formats (mm/dd/yy & dd/mm/yy). At the moment, depending on a users locale, an album or file added to the Gallery has it's date stored in the resources file in their locale date format, rather than the site date format.

Because this date is now in 'string' format, it is resulting in 'Object......' errors when the site tries to convert back to date format for someone viewing the site using a different Locale.

I believe the correct solution is to force all dates in the resources file to one format, and I think the correct XML standard format is yyyymmdd. However, to get there, all users would have to convert the dates in all their resources files, not popular I'm sure!! I would suggest, that it may be better to standardise on mm/dd/yy, since that would probably suit the bulk of users and have least impact.

However, I got the impression from a blog entry from Chris, that their is an intent to move the metadata to be stored in the database, so this may be longer term view of how this problem should be dealt with. However, the potentially manual correction of data may still be needed to migrate existing resource files to the DB.

Chris, if you want a hand validating this issue and some work on a resolution, please let me know. I can also enter into Gemini if you want to track this problem there.

Cheers
Roger


DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
New Post
12/22/2005 1:48 PM
 

I've done some work on this today and I'd propose to replace this (in xml.vb/savemetadata)

            subNode = xml.CreateElement("approveddate")
            subNode.InnerText = ApprovedDate.ToShortDateString
            newNode.AppendChild(subNode)

            subNode = xml.CreateElement("createddate")
            subNode.InnerText = CreatedDate.ToShortDateString
            newNode.AppendChild(subNode)

with this

            subNode = xml.CreateElement("approveddate")
            subNode.InnerText = ApprovedDate.ToString("yyyy-MM-ddThh:mm:ss")
            newNode.AppendChild(subNode)

            subNode = xml.CreateElement("createddate")
            subNode.InnerText = CreatedDate.ToString("yyyy-MM-ddThh:mm:ss")
            newNode.AppendChild(subNode)

This will output a date in format 2005-12-25T09:12:45, which I think is the correct XML format (I'm prepared to be corrected). The read routine will read this in any locale, and will continue to read any dates that are in the same locale they were written. i.e dd/mm/yyyy in en-GB, and mm/dd/yyyy in en-US. This means future dates written will be read in all Locales, and there is support for existing data, giving people (in countries not using mm/dd/yyyy)a chance to correct any resource files that may be giving them problems.

Hope this helps

Roger


 


DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
New Post
12/22/2005 1:48 PM
 
By the way I think this relates to this issue on Gemini - http://support.dotnetnuke.com/issue/ViewIssue.aspx?id=1879

DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
New Post
3/28/2006 4:43 PM
 
Hi Roger

A bit late, but just so you know your work was not in vane - I have also come to the conclusion that it is the bogus dates in the XML files causing these Critical Errors. I manually edited mine to be all american dates (and use a US user to edit the gallery - I don't have time to recompile the source) but hopefully this will be fixed in the next version.

Good work!


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
3/31/2006 10:56 PM
 

You see guys we Americans are taking over the world.  Today it's the dates tomorrow the word "color".  Dropping that extra u outta there.  :)

I used to get in trouble all the time in School for using the UK format for dates and finally stopped. Then got in trouble in the Army for not using the military format (just like the UK style).

I think every date should be stored in epoch format (seconds since 1 Jan, 1970) and let localization handle how it gets displayed. Of course that would really mess up people in say Afganistain (sp) where it's just now the year 1352.

 

Cheers, 


Paul Davis
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsGalleryGalleryLocalization - date conversionLocalization - date conversion


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