- Home
- Forum
- ASP.NET Core
- Remove Timezone
Remove Timezone
HI All,
It's possible to remove timezone +01:00
because in SQL i have : 2017-01-01 00:00:00.000
and in Html.EJ().Grid<object>("FlatGrid") i have : 2017-01-01 01:00:00
It's Urgent please!!
Thanks,
Nicholas
SIGN IN To post a reply.
5 Replies
SA
Saravanan Arunachalam
Syncfusion Team
February 1, 2017 09:32 AM UTC
Hi Nicholas,
Thanks for contacting Syncfusion’s support.
The date-time request on the controller is depend on the server time zone. Please refer to the following link to know more details.
If the client and server has different timezone, the Grid content will show the date based on the client timezone. So, we suggest you to store date-time in common timezone (GMT/UTC) on the database or convert the date to UTC date format and return to the client.
Regards,
Saravanan A.
NP
Nicholas Picardi
February 1, 2017 10:25 AM UTC
Thanks,
But why on Internet Explorer this problem is not present?
SA
Saravanan Arunachalam
Syncfusion Team
February 2, 2017 06:09 AM UTC
Hi Nicholas,
If you return the date from the server without format, it is returned as string to the client and it passes the string to the default browser date constructor. So, we suggest you to format the date while return to show the UTC timezone in all browser and please refer to the below link to get more details.
Regards,
Saravanan A.
AR
Arpan Rao
September 18, 2020 06:24 AM UTC
I am also stuck with same issue, can someone please post the solution here?
MP
Manivannan Padmanaban
Syncfusion Team
September 21, 2020 09:29 AM UTC
Hi Arpan,
Greetings from Syncfusion Support.
To overcome the reported “Time Zone” issue, we recommend that you use ej.serverTimezoneOffset property. Refer to the below code example,
|
<script type="text/javascript">
. . .
var serverTimeZoneDiff = -5.0 // if your server is in EST time zone (UTC -5.0) (in hours)
var clientSideTimeZoneDiff = new Date().getTimezoneOffset() / 60; // get client time zone difference and convert it to hours;
ej.serverTimezoneOffset = serverTimeZoneDiff + clientSideTimeZoneDiff;
. . .
</script> |
Also, refer the below help documentation link.
After referred the above solution, still facing an issue. Please come back to us, with the below details.
- Share the complete grid code example (both client and server end)
- Share the screenshot Or video demonstration of the issue.
Provided details, will help us to resolve the reported issue as early as possible.
Regards,
Manivannan Padmanaban
SIGN IN To post a reply.
- 5 Replies
- 4 Participants
-
NP Nicholas Picardi
- Jan 31, 2017 02:31 PM UTC
- Sep 21, 2020 09:29 AM UTC