This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Timezone differences in SWQL in Custom Query in SAM?

Huh.  Apparently GetDate and GetUTCDate as input into the Custom Query window are dependent on local browser rather than Orion Server, SQL Server or database?

Same dashboard in each, different times from the database. To my knowledge there's no other part of SAM that adjusts the times to the timezone of the browser.

Furthermore, how would UTC report differently?  The value in the second box here is from the simple query:

SELECT GetUtcDate() as a1, GetDate() as a2 FROM Orion.Engines

This is from the desktop of the PST Orion SAM Server: 

Capture1111.PNG

This is from a browser from an EST desktop to that same SAM:

Capture1112.PNG

How is the second one pulling from the browser's timezone versus the Orion server itself?

  • Hi, the information service is designed to return the data always in UTC regardless on the storage (it knows if it's UTC or local in the DB per schemas) and that's also what the resource returns. If you wish to convert the values to the client locale, you can use toLocal() function.

    Example: select ToLocal(keepalive) as [Last Engine Sync] from orion.engines

  • Sure, but there is no conversion being done on GetUtcDate() however it is displaying differently in the two examples above.  The UTC time should be the same regardless if the web console is running on an EST machine or a PST machine.