Showing posts with label switched. Show all posts
Showing posts with label switched. Show all posts

Sunday, March 25, 2012

Daylight Saving Time DST 2007 Problems

I believe my machine is fully patched. The SQL Server believes that it is not yet DST, whereas the windows interface has switched. So what should I do here? (I'm in EST/EDT time zone -- New York City -- commands were run at 1:13 am.)

select current_timestamp,getutcdate()-getdate()

-- --

2007-03-13 00:13:24.843 1900-01-01 05:00:00.000

(1 row(s) affected)

SQL Server gets tim (using all three of these functions) from the Windows OS.

This is a quote from Books Online for getutcdate()-

Returns the datetime value that represents the current UTC time (Coordinated Universal Time or Greenwich Mean Time). The current UTC time is derived from the current local time and the time zone setting in the operating system of the computer on which the instance of Microsoft SQL Server is running.

|||The windows gui gives me the right time. A cmd shell "time/t" command gives me the right time, but the T-SQL I quoted gets the wrong time and all my agent jobs are running an hour late, so something is up here...|||

so, instead of a 5 hour difference between the two you should see a 4 hour difference?

|||Yes. That's right.|||If you go to a cmd prompt and type "time" and open a query window and run "SELECT GETDATE()" Do you get the same hour?

When was the last time you rebooted the server?

It use to be, I don't know if it still works this way, Windows would fudge the Windows clock after DST and would reset the RTC clock when the computer rebooted.

So your RTC could say 1:13pm and Windows would report 2:13pm, until you rebooted.

|||We noticed that about 50% of the time the DLS Patch that we applied to Windows 2003 did not update the registry values for daylight and daylight end. We found that the time would update and display correctly on the OS, but anything that capture time via some time/date.dll would be an hour off.

Daylight Saving Time DST 2007 Problems

I believe my machine is fully patched. The SQL Server believes that it is not yet DST, whereas the windows interface has switched. So what should I do here? (I'm in EST/EDT time zone -- New York City -- commands were run at 1:13 am.)

select current_timestamp,getutcdate()-getdate()

-- --

2007-03-13 00:13:24.843 1900-01-01 05:00:00.000

(1 row(s) affected)

SQL Server gets tim (using all three of these functions) from the Windows OS.

This is a quote from Books Online for getutcdate()-

Returns the datetime value that represents the current UTC time (Coordinated Universal Time or Greenwich Mean Time). The current UTC time is derived from the current local time and the time zone setting in the operating system of the computer on which the instance of Microsoft SQL Server is running.

|||The windows gui gives me the right time. A cmd shell "time/t" command gives me the right time, but the T-SQL I quoted gets the wrong time and all my agent jobs are running an hour late, so something is up here...|||

so, instead of a 5 hour difference between the two you should see a 4 hour difference?

|||Yes. That's right.|||If you go to a cmd prompt and type "time" and open a query window and run "SELECT GETDATE()" Do you get the same hour?

When was the last time you rebooted the server?

It use to be, I don't know if it still works this way, Windows would fudge the Windows clock after DST and would reset the RTC clock when the computer rebooted.

So your RTC could say 1:13pm and Windows would report 2:13pm, until you rebooted.|||We noticed that about 50% of the time the DLS Patch that we applied to Windows 2003 did not update the registry values for daylight and daylight end. We found that the time would update and display correctly on the OS, but anything that capture time via some time/date.dll would be an hour off.

Wednesday, March 21, 2012

datetime params quit working when i switched from ws to wcf

hi

HHello!, the following 3 webmethods still work after i switched them to WCF but now it never accepts my parameters. i didn't change anything in reporting services, but i have a feeling it's not sending the params to the service anymore.

is there an operation contract attribute change i need to make to require the datetime be provided by RS?

here's the schema provided by my serviec wsdl (the relevant portion)

- <xs:element name="EeoByAssignmentReport">

- <xs:complexType>

- <xs:sequence>

<xs:element minOccurs="0" name="start" type="xs:dateTime" />

<xs:element minOccurs="0" name="end" type="xs:dateTime" />

</xs:sequence>

</xs:complexType>

</xs:element>

- <xs:element name="EeoByAssignmentReportResponse">

- <xs:complexType>

- <xs:sequence>

- <xs:element minOccurs="0" name="EeoByAssignmentReportResult" nillable="true">

- <xs:complexType>

- <xs:annotation>

- <xs:appinfo>

<ActualType Name="DataSet" Namespace="http://schemas.datacontract.org/2004/07/System.Data" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />

</xs:appinfo>

</xs:annotation>

- <xs:sequence>

<xs:element ref="xs:schema" />

<xs:any />

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

- <xs:element name="EeoByPersonReport">

- <xs:complexType>

- <xs:sequence>

<xs:element minOccurs="0" name="start" type="xs:dateTime" />

<xs:element minOccurs="0" name="end" type="xs:dateTime" />

</xs:sequence>

</xs:complexType>

</xs:element>

- <xs:element name="EeoByPersonReportResponse">

- <xs:complexType>

- <xs:sequence>

- <xs:element minOccurs="0" name="EeoByPersonReportResult" nillable="true">

- <xs:complexType>

- <xs:annotation>

- <xs:appinfo>

<ActualType Name="DataSet" Namespace="http://schemas.datacontract.org/2004/07/System.Data" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />

</xs:appinfo>

</xs:annotation>

- <xs:sequence>

<xs:element ref="xs:schema" />

<xs:any />

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

- <xs:element name="EeoCountsReport">

- <xs:complexType>

- <xs:sequence>

<xs:element minOccurs="0" name="start" type="xs:dateTime" />

<xs:element minOccurs="0" name="end" type="xs:dateTime" />

</xs:sequence>

</xs:complexType>

</xs:element>

- <xs:element name="EeoCountsReportResponse">

- <xs:complexType>

- <xs:sequence>

- <xs:element minOccurs="0" name="EeoCountsReportResult" nillable="true">

- <xs:complexType>

- <xs:annotation>

- <xs:appinfo>

<ActualType Name="DataSet" Namespace="http://schemas.datacontract.org/2004/07/System.Data" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />

</xs:appinfo>

</xs:annotation>

- <xs:sequence>

<xs:element ref="xs:schema" />

<xs:any />

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

the reason i suspect it's not sending the data is because i have another method that takes a uint, and somehow the client proxy automatically generated a new bool property called <myuintname>Provided (or something like that) and now i always have to set that to true or it won't send the uint... I think that's what is happening here, except i have no way to set such a property since i'm sending pure primitaves no message contracts or anything.

i have to admit this behavior in the wcf is extremely frustrating, because all it does is zero out the field when you don't provide t he bool flag...which if i didn't want to send anything it would automatically be zero'd out because i didn't set it to anything.... makes no sense at all.