Try our conversational search powered by Generative AI!

Setting Up Commerec site in different timezones

Vote:
 

We have a requirement from our Customerm They want to setup there UK site for Austrailia. It will be a new site with new licenses but will be hosted on Same Server, and database server will also be same. Austrailia time zone is different(GMY +10), and they want All orders created on Austrailian site should have Austrailian date and time stamps. How should we configure the sites? Do we need some programatic chnages for this.

#58746
May 03, 2012 9:24
Vote:
 

By default, Commerce stores time stamp data in UTC time. So there would need to be programmatic changes made to the client (i.e. Commerce Manager) to convert UTC time to the local time of the user.

Essentially, the data will be stored in UTC time. When a request is made by the client, depending on the geographic region of the request, it will convert the UTC time to the local time and display to the user as such.

Please take a look at this link: http://stackoverflow.com/questions/179940/c-sharp-convert-utc-gmt-time-to-local-time

#59291
May 30, 2012 1:37
Vote:
 

I confirmed from Episerver Technical support that Episerver Commerce doesnot support Sites in Multiple Zone On SAME SERVER, it is saving in UTC but display in a local system date. so It will display all dates based on local web server settings.

 

I further investigated the media chase library and found that it has never been implemented and can be done by EPiServer with very little effort.

All of their forms in background are referring to a function in Mediachase.Web.Console.Common.ManagementHelper. Bad news is that they have not implemented this function for timezone.
 
              /// <summary>
              /// Returns datetime value converted based on current user's settings.
              /// </summary>
              /// <param name="dt">DateTime in UTC.</param>
              /// <returns></returns>
              public static DateTime GetUserDateTime(DateTime dt)
              {
                     // TODO: need to store time zone settings for each user and display datetime based on these settings.
                     return dt.ToLocalTime();
              }

#59344
Jun 01, 2012 16:43
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.