I'm working on a project that requires time validation of data within an xml file. There is a timestamp in one of the nodes that is compared with the current system time.
While working on this, I noticed that SWFKit was returning time 1 hour behind my system time.
To duplicate:
create a new fla file
add 2 dynamic text boxes
set the instance name on one of them to "FlashDate"
set the var name on the other to "SWFDate"
put the following actionscript code in frame 1
Code:
var tmpDate=new Date();
FlashDate.text=tmpDate;
fscommand("ffish_run","UpdateTime");
publish to generate the swf file and add it to a new swfkit project
create a new script named "UpdateTime"
put the following code in it.
Code:
var tmpDate = new Date();
FlashPlayer.bindData("SWFDate");
FlashPlayer.SWFDate=tmpDate;
FlashPlayer.updateData(false);
FlashPlayer.unbindData("SWFDate");
I've copied/pasted the resulting data
Code:
Thu Jun 26 23:47:22 GMT-0400 2003
Thu Jun 26 22:47:22 GMT-500 2003
Thanks in advance