代码如下:DECLARE LocalDate DATETIME, UTCDate DATETIME, LocalDate2 DATETIME SET LocalDate = GETDATE() SET UTCDate = DATEADD(hour, DATEDIFF(hour,GETDATE(),GETUTCDATE()), LocalDate) SET LocalDate2 = DATEADD(hour, DATEDIFF(hour,GETUTCDATE(),GETDATE()), UTCDa