Date saving incorrectly due to timezone issue

  • 3 January 2020
  • 3 replies
  • 1 view

Hi All,


I have a form that is used in two different timezone which are two hours apart. TimeZone 1 is two hours behind TmeZone2 and K2 server as well as SQL server is in TimeZone 2. So one user submitted a form from TimeZone 1 with a date as 02/01/20*personal details removed*:;59:00 PM but it is saved in the SQL as 03/01/20*personal details removed*:59:00 AM due to the timezone difference. How can I fix this issue? Using string? Any other option is there?




3 replies



You should always save time as server time or you need to save wich time zone all clients are using.

Are all Client's in same time zone? Then it is easiest to set the server time zone to that one.


If not you should still save with server time zone then if you want client to see their time you could set it with javascript inside an expression.



<script>var date = new Date([MyDateString] + ' GMT'); //GMT being server timezone
date.toString(); //Will give date with client timezone.</script>


Hope this helps



Good day madhu_hari


Please see the following. I hope they will help.

“Date saving incorrectly”:,

“Write to db using my current timezone settings”:




Hi Madhu,


Are you using a calendar control for the date? If yes kindly check the below 


Date/Time value is being converted to the user's local timezone if smartforms was accessed on a different timezone than the K2 server. When it is saved into the database, the K2 server converts the value to the server's timezone. This is an expected behavior.



Kindly checkout the below link for more details on it


Hope this helps