Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Garrett Fisher 341 posts 496 karma points
    Jan 08, 2010 @ 22:45
    Garrett Fisher
    0

    CurrentDate() Returning February 26, 2009

    Why?!n  Where does this date come from?  Not the Database?

     

    Thanks,

    Garrett

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 09, 2010 @ 00:10
    Aaron Powell
    0

    I'm assuming you're referring to the method umbraco.library.CurrentDate() 

    This method looks at the system date of the machine, using DateTime.Now:

            public static string CurrentDate()
            {
                return DateTime.Now.ToString("s");
            }

    Is the clock correct on the machine? Can you try invoking DateTime.Now yourself and comparing the results

  • Garrett Fisher 341 posts 496 karma points
    Jan 12, 2010 @ 17:37
    Garrett Fisher
    0

    That's the thing-- the date is correct on my machine.  And no matter what the date IS, this method returns February 26, 2009.  It's bizarre.

  • Pete Miller 8 posts 26 karma points
    Jan 12, 2010 @ 20:19
    Pete Miller
    0

    Perhaps you could show the code you're using to display that result.

    Thanks

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 12, 2010 @ 22:39
    Aaron Powell
    0

    Yeah your code would be useful. And did you try your own insertion of DateTime.Now?

Please Sign in or register to post replies

Write your reply to:

Draft