Hi,
We have hundreds of forms using javascript to, amongst other, populate calendar date fields...
The user fills a field ('scrutin' = date 0) which is validated... If it is a real date, AND A SUNDAY, then we populate the other days of the month.
It works very fine in all Reader/Acrobat version from 5.05 through 8.x. And it's been working fine for years!
I don't know why, but the time zone changes 'one day or the other' : for instance, if the user enters 20100328 (yyyymmdd = March 28, 2010) then, on march 14th, the time zone changes from GMT-0400 to GMT-0500 (We are in Québec, Canada). It is OK in previous versions, since util.scand() returns the exact moment of the event: so if it is 2 p.m., and the time zone changes, we get to 1 p.m. the same day, and we're OK.
In version 9, however, valueOf() returns the day, at 00:00:00, so midnight. Then, I think the rest is quite obvious: When we read the date in the field ('scrutin' = date 0), we use 'valueOf' to get the time in milliseconds since jan. 1, 1970. The time is then converted to a date with util.printd(). We now have a date with 00:00:00 (so midnight) as time of day. When the time zone changes, we are brought back to the day before, at 11:00 p.m.!
You can check it at: (Sorry, the messages in the form are in French! Remember to enter a SUNDAY... )
http://www.electionsquebec.qc.ca/calbugforum/DGE-1003.1_bug.pdf
Has the core javascript changed? I don't think so... So, any idea what has changed in version 9.
And the real question is : Is it a bug that will be fixed, or do I have to go through all our forms to modify every 'date calculating' function???
Thanks
Eric
Instead of assuming a non-blank value for the'scrutin' filed is 'true' enter statement that will resolve to a true of false value.
George Kaiser