K2 Smartform and Time Zone problem

  • 27 March 2015
  • 1 reply
  • 22 views

Badge +3

Dear Experts,

 

I have problem in K2 Smartform about time zone.

 

Why the default time zone and current date in K2 Smartform always same (searching at) as date local windows computer.

 

For that problem i was doing 2 scenario/test :

 

1. 

 

For Example, today date is March 27'th, 2015.

i open a simple form (from my local computer, not from server, which the form contain calendar control that i set today current date), so after the form initialize the form show march 27'th, 2015.

after that i change my local windows datetime (at regional setting) to another date, March 28'th 2015, then i reload the form again, then it shows march 28'th 2015.

 

 

2.

My Local Computer time zone : (UTC+7 : Bangkok, Hanoi, Jakarta)

 

i run a form that contain only list, which inside the list contain a field datetime, after the list showed the the date time field same as the SMO (i use sql server as database), after that i change my local windows time zone to (UTC-12:00) International Date Line West, and i reload the form again,  the datetime field value changed !.

 

From that scenario i know that K2 Smartform get datetime and time zone by my computer datetime setting (not from server datetime setting)

 

So my question is, Is there any configuration or something to make the K2 Smarform datetime setting (also the time zone) reference to server datetime setting ?

 

Thank you,

 

Musa

 


1 reply

Badge +8

Hello Musa,

 

A solution to this problem could be to create a view in your db, and then create a smartobject off of that view, and throw the output of the smartobject into a data label in your view in designer.

 

Something as simple as...

 

CREATE VIEW [dbo].[systemdatetime]
AS
SELECT SYSDATETIME() AS SYSTEMDATETIME

 

should suffice for this issue.

 

Regards,

Matt

Reply