Skip to main content

Hi Team,

On the search screen, the date field gives the UTC date and time, Is there a way to use the user's local date and time instead of UTC as the default?

For reference, Adding the below screen shot.

 

Date Selected:

Script:

Gives UTC time:

 

 

Thanks

Venkat

Hi @venkatesh 

Depends what you are trying to do. What is your target?

You can get the value with DB query and manipulate the value with the SQL script.

But generally speaking, it should not affect your script. But again, it depends.

Cheers!


Hi @Shneor Cheshin 

I really appreciate you taking the time to look into this issue. I am trying to update the database with the user's given date and time as their local time. Consider a scenario where a technician from the US enters the start date and end date. In this case, the system should store the date in local time; similarly, for India, it should be IST, and it goes on based on the technician's timezone. When I use a DB query, region input is required to store the date. is there a way, without providing input, we can store the user's local time? 

Note: Using client scripts, insert the record.

Thanks

Venkat

 


Hey @venkatesh 

The main question remians. What are you trying to achieve? What are the business requirments?

Storing the values in local time is not a goal, but a way to achieve something. Waht is it?

Why are you using client scripts to store values?

I think you need to elaborate in order for us to help you.

In any case, the date timezone should not be an issue.

PS, when I query the DB I date/time fileds in my local timezone. So not sure why you have an issue.

Cheers!

 


Hi @venkatesh,

is it related to offset time between summer time and winter time?


@venkatesh ,

I believe you are trying to store a time that is independent of time zone.  Meaning that it doesn’t matter what time zone a person is in, the field will always show the same value.  You should be able to control this by setting the proper Mask Type in the column metadata.  I don’t remember exactly, but the value to select is something like DATETIMENOTZ.


Reply