Hello, I am having an issue that should affect anyone that is trying to pass DateTime object to client javascript. I've been having this issue for weeks and even though found some workarounds ( mentioned below ) I am still not satisfied with this issue as "resolved".
I am currently in final stages of deploying a fairly big atlas solution. I've been very pleased with the experience developing in asp.net 2.0 and atlas accept for the datetime serialization, and javascriptobjectserializer to a lesser extent. datetime properties are always adjusted with a browser time zone whenever atlas script manager is used to call webservices directly, or javascriptobjectserializer is used. i started using JSON ( instead of javascriptobjectserializer) because it allows for object converters to be supplied so that serialization of certain types of properties can be fully controlled. javascriptobjectserializer also appears to serialize enums incorrectly ( as ints instead of strings ) so json was helpful in that regard for me. atlas ajax: calling webservices directly from javascript using atlas script manager control will automatically adjust all datetimes even if the server and browser are on the same machine (and yes my time zone is set correctly), the only remedy i found so far is that converting datetime .ToUniversalTime() on the server can be helpful in stopping timezone adjustments. but this will be a big pain when using custom objects and 2 way communication. Brad Abrams posted a way to ignore Time in DateTime serialization, and that is by adding [XmlAttribute(DataType = "date")] to the property definition. this will work between web and app tiers, but appears to be ignored by atlas serialization as well. (of course this method is only useful when only the Date portion is relevant and you dont want the adjusted timezone to kick the date back or forward a day) i wish there was a way to set IIS to stop adjusting timezone for browsers. Perhaps I am missing something more obvious here and i will keep at it until its all clear --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/ajaxpro The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info/ Don't forget to read my blog at http://weblogs.asp.net/mschwarz/ The open source project is now located at http://www.codeplex.com/Wiki/View.aspx?ProjectName=AjaxPro -~----------~----~----~----~------~----~------~--~---
