I want to use a Query Activity within Automation Studio to find all of our app's users who last logged in between 24 and 25 hours ago. When I run the below query into a data extension, I instead get LastLogin (a datetime field that, as the name implies, records our users' last login) values from 26-27 hours ago.
I'm in New York (US Eastern Daylight Time or UTC-4 right now). This seems to imply Salesforce's servers are set up in Mountain Daylight Time. But I'm not sure if maybe instead the servers reside in some place like California and just use a UTC offset (making it seem like it's in Mountain Time for half the year and Pacific Time for the other half).
Does anyone have experience with GETDATE() in Marketing Cloud or knows where I can find documentation from Salesforce on the subject? I'd like to know what the best practice is here so I don't have to change all my queries twice a year to accomodate for Daylight Savings.
SELECT u.UserId, u.EmailAddress, p.LastLogin FROM ENT.[User] u INNER JOIN Player p ON u.UserId = p.UserId AND u.UserId IN (SELECT UserId FROM Player WHERE LastLogin <= DATEADD(hh, -24, GETDATE() ) AND LastLogin >= DATEADD(hh, -25, GETDATE() ) )