Date weirdness between ColdFusion and ASP.NET web service
ColdFusion code calls an ASP.NET web service passing the following parameters:
Web service operation Usage with parameters {EndDate={{ts '2011-08-31 00:00:00'}},StartDate={{ts '2011-08-01 00:00:00'}},CustomerCode={905841},FullUserName={customeris},SessionID={184F2426-685D-4F14-B8F1-C5E9E3B56DA2}}
For some reason, the ASP.NET developer can run it outside the code on her system and get everything between 2011-08-01 and 2011-08-31, but when we run it through the coldfusion code, we keep getting 2011-07-31 (i.e. the last date of the preceding month) data included in the resultset. Even if I hardcode the dates, it still happens. We though it might be related to the "00:00:00" time portion of the date, but hardcoding that to be after midnight doesn't help.
Has anyone struck anything similar? Essentially, the web service is running fine, just that CF seems to want to add the last date o开发者_StackOverflow社区f the previous month. So, this is really just a callout to other developers who may have had a similar experience. Otherwise please ignore. I don't want to get into debugging the web service itself. Just want to know if this is a known date issue between ColdFusion and ASP.NET.
UPDATE
Somewhere between the ColdFusion call and ASP.NET delivery, one day is being subtracted from BOTH the start and end dates. Both platforms are on servers located in the same physical location.
Not the exact answer, but if possible, you might want to use the standard millisecond since Jan 1, 1970 to avoid any confusion between the two platforms.
So is the ASP.net webservice returning data from 07/31? Or do you mean if you try creating a similar webservice in ColdFusion, then Coldfusion returns data from 07/31? If it's the latter, show us your code.
Couldn't resolve this quickly. We ended up simply adding a day to the passed date.
Both our ColdFusion and .NET web service are at the same location, but the DateTime
object displays its data in local time, but the Kind
property is set to Utc
. I used the ToLocalTime
method to get the date I expected.
精彩评论