Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 15 of 15

Thread: Date & Time format

  1. #1
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default Date & Time format

    Hello,

    I have my site hosted in the USA, but I am located in the UK.

    Because of this all of the dates and times on the site are US based.

    Is there anyway to tweak this so that the site can run on UK times?

    Thanks!

  2. #2
    Rob is offline Senior Member
    Join Date
    Aug 2004
    Posts
    3,037

    Default

    There are two locales:

    a) one for the server (db most importantly) locales, which is WHERE you are hosting it, and the other
    b) is for what active/master locale you want info displayed in (string resources, currency, etc).

    This should all be in our manual (hopefully )
    AspDotNetStorefront
    Shopping Cart

  3. #3
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Ok thanks, but would you happen to have the link to how to change this in the manual?

    All I could find were things like localization where you add new languages etc. I did try to find it before posting in the forum

  4. #4
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    The instructions in the Manual are here. Specifically, Step 5 sets the "culture" attribute of the < globalization > element, which the .NET Framework uses to format dates and times.

    In XMLPackages, you can use the GetLocaleShortDateString XSLT Function to display dates in the locale of the current customer.
    Jon Wolthuis

  5. #5
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Dear Jon,

    Thank you very much for your response.

    I have looked this up and it seems like its already set to GB? This is what I can see:

    <!-- GLOBALIZATION This section sets the globalization settings of the application. -->
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-GB" uiCulture="en-GB"/>

    Is there somewhere else that this should be changed?

    Many thanks

  6. #6
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    Your Admin site is showing dates in a different format? I guess I don't know what you mean by "times"; the current time is based off the clock in your server.
    Jon Wolthuis

  7. #7
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Ah I guess I didnt explain it properly

    Basically the server (hosting) is in the USA, but the website is a UK website. Which is why the database (i.e. admin) shows all USA times (as in order times), however I was hoping there was a way I could + or - a few hours to this in order to ensure the time format is in UK times.

    I hope this makes sense

  8. #8
    nihon is offline Senior Member
    Join Date
    May 2008
    Posts
    150

    Default

    I had the same problem
    To change this you have to be on a dedicated server..
    Login to your server and change the time zone on your server ..

    I believe thats the only way..
    Version (Code/DB):
    AspDotNetStorefront ML 8.1.2.0/8.1.2.0

  9. #9
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default

    seems like it would be a simple fix to have an appconfig setting of "timezoneadjust" and you put in the hours difference.

    So if my site is hosted in California and I am in New York I would set it to 3 hours and the orders would show up properly in my control panel

  10. #10
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Hello there, thank you for your posts.

    Nihon, I am not on a dedicated server so this option isnt possible I think, shame really.

    And ssgumby, I guess this looks like it might be the only way around it. I was hoping there was a way to fix this without having to code something up. I guess its not as simple as I had hoped!

  11. #11
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    If this is a single locale site, see the following KB article: https://support.aspdotnetstorefront....barticleid=118

    Doing so will ensure that your site properly displays dates correctly. This works fine, but you must ensure that your DB SQL Server Locale web.config parameter is set correctly to match the server/database. If not, you could notice some inconsistent date format.

    Regarding times, everything is calculated using the server/sql server date time settings. Adding an offset for this is not a trivial task at all, and requires modifying hundreds/thousands of lines of code for no real benefit really.

  12. #12
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Hello Dan,

    Excuse my ignorance BUT - what did you mean by this:

    Regarding times, everything is calculated using the server/sql server date time settings. Adding an offset for this is not a trivial task at all, and requires modifying hundreds/thousands of lines of code for no real benefit really.



  13. #13
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    There are four "times" involved when dealing with an order:
    1. The shoppers local time
    2. The web server and database server local time
    3. The credit card processors time
    4. The merchants local time


    They can all be different, and can vary depending on British Summer Time or American Daylight Savings Time (both switch over on different calendar days). Also, not all US states follow Daylight Savings Time (it's optional, and left up to each state).

    We have made the design decision to base everything off the web server/database server time. We use this time as the basis for aggregating data presented on reports, and timestamping customer records and order records.

    We recognize that this decision has an impact on trying to reconcile with your credit card processor's data, where the day might end at a different point in time. We've considered basing everything off Coordinated Universal Time (UTC), but the task hasn't been prioritized.

    In my opinion, this design decision affects very few merchants in a profound way. Typically, the worst case scenario is that order timestamps are a fixed number of hours different than the clock on the wall.

    But I don't see a scenario where order volume, SEO, or customer experience is affected at all.
    Jon Wolthuis

  14. #14
    newtothis is offline Senior Member
    Join Date
    Mar 2009
    Posts
    200

    Default

    Hello Jon

    Thank you for your response, its very helpful in providing more info in regards to the time structure.

    In regards to the reasons why we were wanting to change the times...well there are two.

    The first you mentioned - so that we can more easily reconcile the transactions with that of our bank. The other is to avoid confusion from our customers when they place an order. Their receipts are appearing with a different time zone on it - and causes some to wonder where we are based...some have thought that we must not be based in the UK and this is not an ideal situation to be in

  15. #15
    jchamlin is offline Junior Member
    Join Date
    May 2011
    Location
    Bellevue, WA
    Posts
    5

    Default Is this still a bug? Wow

    Hello

    I am hosting over 20 other sites. Most of the applications we are hosting have a time-zone off-set. Is ASPDNSF still not able to 'adjust the time stamp' for the business time zone vs. the server which in our case is 2 hours ahead?

    Bottomline, if I change the time on the server for JUST this site, I will screw-up all the other sites that actually have adjustments (i.e. - magento and nopcommerce).

    jch