Thanks for the input here.
The date object in Freeway still wants me to believe that the date is Monday June 11th 2012 (rather than Friday June 15th).
Jeremy, the Current Date Action works because all of the date manipulation is done in the browser rather than in Freeway. For the moment I’ve got a timestamp from Terminal which works perfectly fine with the only downside being the Action needs AppleScript enabled to run.
Walter, do you get the correct date if you run this Action?
<page-action>
<action-javascript>
function fwAfterEndBody(){
alert(new Date());
}
</action-javascript>
</page-action>
I’m wondering if I’ve somehow managed to mangle Freeway’s internal timezone or offsets over the years.
Regards,
Tim.
On 15 Jun 2012, at 17:16, Walter Lee Davis wrote:
Does anything change if you set the date to a variable first, and alert the variable? I’m thinking it may be an order of operation thing. Also, look at any of the accessors in the Date object, rather than just relying on the default that comes when you cast the object to string.
var d = new Date();
alert(d.toLocaleString());
alert(d.getDate());
alert(d.getUTCDate());
alert(d.toUTCString();
There’s a good list of things to try here: Date - JavaScript | MDN
As far as why this might be the case, I would put it down to using an ancient fork of Mozilla’s JavaScript engine from back when Freeway 2 was a thing. I don’t know how or how much it’s been updated since that epoch, but as far as I know, that’s the Genesis of JavaScript in Actions.
FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com
FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com
actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options