SCCM WOL waking PC's hour early.
Nick, I've been running into this problem somewhat for a while now (a little over a year).It started when I installed Reporting Services to email me an hourly update status on deployments within the hour (failed or succeeded).Instead of setting my time to within the last hour I had to set it to (between -5 and -6 hours) depending on DST. After running your offset query, I get returned (-300 & -360) which explains why my report timestamps are off by 5-6 hours depending on time of year.How can I resolve this to make it seem more real time?Should I change the values or what are my alternatives since my report timestamps are off 5-6 hours?
Well, if your report timestamps are off 5 to 6 hours, you may need to modify your query to adjust to the UTC format that SCCM puts some information in.This KB applies to SMS, but is the same for SCCM: http://support.microsoft.com/kb/830642 It tells you how to write a query that contains data in UTC Format.When you run the queries in SQL, you'll need to declare and set the @__timezoneoffset integer... like so:
declare @__timezoneoffset int
select @__timezoneoffset = DateDiff(ss,getutcdate(),getdate())
To use in a report, you do not need to declare the @__timzoneoffset integer. SCCM reports already have it declared. Just change the time value in your report to:
DATEADD(ss,@__timezoneoffset,time)
-- where 'time' is the time value in your report.
-- like so:
select
adv.advertisementid,
adv.advertisementname,
cas.laststatename,
DATEADD(ss,@__timezoneoffset,cas.laststatustime)
from v_clientadvertisementstatus cas
join v_advertisement
on adv.advertisementid = cas.advertisementid
where resourceid in
(
select resourceid
from v_r_system
where
netbios_name0 = 'pick a computer name'
)
nick
January 22nd, 2010 5:37am