We have moved to GitHub Issues
Created by Tom Fulton 07 May 2013, 04:38:51 Updated by Shannon Deminick 26 Jun 2017, 05:41:32
I'm using ContentService to save a DateTime value on a Label property, like so: contentService.SetValue("someLabelProp", DateTime.Now)
When I access initially via ContentService or IPublishedContent, it works just fine. However, if I Save/Publish the node in the Umbraco UI (not ContentService), I get the following:
Both the Date Picker and Label show the same value/format in the dataDate field in the database in the formatting: 2013-05-06 21:58:43.000
When I use SetValue and SaveAndPublish via the ContentService, the umbraco.config shows some inconsistencies:
Visiting the node in the Umbraco UI, the Label shows this: 06/05/2013 22:21:54 (dates flipped)
If I Save/Publish from the UI, the month/days are now flipped in umbraco.config:
There's some sample code attached you can just paste into a template.
Side note: I get even weirder results when trying this with a Textstring (backed by Date storage) instead of a Label - the dates are fine in the DB but the XML Cache has no value for the textstring date initially. After publishing in the UI it gets the string with the flipped months/days.
Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/
Backwards Compatible: True
Affected versions: 6.1.0
Due in version: