DateTime (timezone) error in Administration

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I downloaded and install NopCommerce 1.8 in a Windows 2008 R2 server with SQL 2008 R2.
The front end works with no problem at all, but when i try to go to the backend (Administration) i get the following error:


[ArgumentException: The supplied DateTime represents an invalid time.  For example, when the clock is adjusted forward, any time in the period that is skipped is invalid.
Parameter name: dateTime]
   System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags) +12515335
   System.TimeZoneInfo.ConvertTimeToUtc(DateTime dateTime, TimeZoneInfo sourceTimeZone) +272
   NopSolutions.NopCommerce.BusinessLogic.Profile.DateTimeHelper.ConvertToUtcTime(DateTime dt, TimeZoneInfo sourceTimeZone) +60
   NopSolutions.NopCommerce.BusinessLogic.Orders.OrderManager.OrderAverageReport(OrderStatusEnum os) +808
   NopSolutions.NopCommerce.Web.Administration.Modules.OrderAverageReportControl.BindData() +110
   NopSolutions.NopCommerce.Web.Administration.Modules.OrderAverageReportControl.Page_Load(Object sender, EventArgs e) +122
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048


I'm from Chile and my server has Santiago (utc -4) as time zone.

Please I need help with this issue.

Regards,

Gerardo Kri
13 years ago
https://www.nopcommerce.com/boards/t/6749/problem-entering-the-administration-module-the-supplied-datetime-represents-an-invalid-time-for.aspx
and
https://www.nopcommerce.com/boards/t/6739/error-in-dashboard-admin-area.aspx

Very strange. It seems that only users from Chile get this error
13 years ago
Andrei,

It does seem to be a problem with the implementation of DateTime function in ASP.NET, when the time zone is set to Santiago.
I changed the time zone in the database for “central mountain” (I saw this in another post) in order to gain access to the backend; then in the admin module set the time zone to Atlantic Time (Canada) which is also UTC-4, and all worked OK.
The only problem with this workaround is that you need to check the time manually twice a year (when the summer time begins and ends).

I don’t know if Microsoft makes regular updates to the time zone data, if so, maybe the problem is that this year Chilean government postponed the end of day light saving time after the earthquake on February 27 and the time zone data has some inconsistency. I really do not know, but it is a plausible explanation.

Thanks,
Gerardo Kri
13 years ago
nopCommerce team | a.m. wrote:

Some brazilian regions are at daylight saving time, and today we started to get the same error.
13 years ago
Here in Sao Paulo, Brazil we are having the same problem.
By decret, daylight saving time begins on Oct, 17th and ends on Feb, 21st. Always.
At Pernambuco, Brazil, we don't have this problem because Pernambuco does not enter dst.

I'm working on a code to fix this problem.
13 years ago
I had the same problem... something about daylight saving time..
problably about the synchronization from the server and the time.windows.com ???
13 years ago
I Have the same problem.

Error DateTimeHelper.cs
        public static DateTime ConvertToUtcTime(DateTime dt, TimeZoneInfo sourceTimeZone)
        {
Error line -->         return TimeZoneInfo.ConvertTimeToUtc(dt, sourceTimeZone);
        }

The supplied DateTime represents an invalid time.  For example, when the clock is adjusted forward, any time in the period that is skipped is invalid.
Parameter name: dateTime.

{(GMT-03:00) Brasília}
"Horário brasileiro de verão"

direct link - http://localhost/administration/globalsettings.aspx

To resolve temporarily disabled it Select Time Zone

Zone of the store to (GMT -06:00)

And I'm waiting for the correction of the error in codeplex
Thanks
13 years ago
This error occurs here in Brazil because of our "Summer Time". Our government changes the time zone adding one hour. So we have to edit the Time Zon to UTC -2
13 years ago
For those guys the live in Brazil. And can not access the admin area becouse the error...

At the table [ Nop_Setting ]

Set the colum 'Name': Common.DefaultStoreTimeZoneId to UTC-3

Our hour local time of (GMT -03:00 Brasília)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.