Copied to clipboard

Flag this post as spam?

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


  • Paul Blair 466 posts 731 karma points
    May 11, 2009 @ 12:16
    Paul Blair
    0

    How does Umbraco store Date Time values

    Am I correct in thinking that Umbraco stores datetime values based on the server's date?

    I have a server based in a different time zone to the majority of the users, but I would like the publish date to reflect the local time of the user.

    Any ideas?

    Cheers
    Paul

  • Dan Diplo 1505 posts 5911 karma points MVP 4x c-trib
    May 11, 2009 @ 17:29
    Dan Diplo
    0

    Yes, it gets date and times from the server.

    I guess you would have to use a date formatting method that adds or subtracts an offset value onto the date from the server to convert it to local time. ie. if the server is 7 hours ahead then subtract 7 hours from all dates when displaying them. You could do this via .NET or through existing XSLT extension methods.

  • Paul Blair 466 posts 731 karma points
    May 14, 2009 @ 07:41
    Paul Blair
    0

    Hi,
    I'd quite like the times displayed in the Umbraco back-end (last updated etc.) to also be correct and also adding/subtracting values will get messy when you take daylight savings into account.

    Are there any plans to store the dates in Umbraco in UTC in the future?

    What about the e-commerce sites out there - they must have something in place for handling dates across time zones?

    Cheers
    Paul

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies