cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UTC LastTime for Enterprise Scanners in multiple time zones

sebouh
Engaged Sweeper
Are there any plans to incorporate features to normalize dates in an enterprise install of Lansweeper to UTC time? Right now I have a report that shows the list of computers to which a certain change has occurred in the last XX minutes (usually 60 to 240), however when I try to do a DATEDIFF between the date in the respective TsysLastscan.Lasttime field and GETDATE() {the current time on SQL Server} it misses computers in the timezones that are not in the same timezone of the SQL server.

WHERE ([lansweeperdb].[dbo].[TsysLastscan].[CFGcode] = 56) AND
DATEDIFF(n,[lansweeperdb].[dbo].[TsysLastscan].[Lasttime],GETDATE())<=240

I managed to implement a workaround by adding a UTCLasttime field to the [lansweeperdb].[dbo].[TsysLastscan] table and then a trigger that updated that field with the UTC adjusted Lasttime (adjusted based on the timezone of the scanserver).

My workaround works, but I hate customizing built-in tables. I just wanted to see if there were any enhancement requests or plans to normalize the dates to a particular timezone.

Thanks
Sebouh
1 REPLY 1

Lansweeper
Lansweeper Former Employee
Lansweeper Former Employee
Some Datetime fields use the local time of the machine, some use the time of the database server. The Lasttime field in table TsysLastscan indeed uses the time of the scanning server, which explains why it is not necessarily uniform for all entries.

We do not currently have plans to make Datetime fields uniform, but we will add this item to our customer wish list.