Anyone interested in Dates and passing them between different languages, I had an issue with selecting dates in a Flash UI which uploads them to a data base via a webservice and pulls them back again. Some were coming back a day earlier and some not. After some (hours) investigation I tracked down the offending date to 29 March… Ah, British Summer Time +1 hour. Flash sends the date out as UTC (universal time) so the date is being read on the server as the day minus one hour to compensate if in BST. The default setting for hours is zero so if not set this equals the day before.
The solution to read the date on the server as Locale time, though depending on the circumstance this may only be wise if you can be sure both server and client are in the same time zone. Or in AS to set the hour of the date to anything greater than zero, or substract the timezoneOffset from the minutes.
Though useful if dealing with time zones it can be a little confusing if you just want a date of a particular day. UTC is the not only the date but a point in time as well. The date of that time could be yesterday if your east of Greenwich or tomorrow if west.