:: Forum >>

setTextTimezone

It looks like the argument taken by setTextTimezone is in hours not milliseconds.

The line below sets the time forward 7 hours and not 7 milliseconds
date.setTextTimezone(-7);
Florin
Wednesday, January 23, 2008
No, it does not. What you see is probably related to your local timezone offset - try adding timezone to the input date or use setDataTimezone(0)

var fmt = new AW.Formats.Date;

fmt.setTextTimezone(-7);
fmt.setTextFormat("yyyy-mm-dd hh:mm:ss");

fmt.setDataTimezone(0);
fmt.setDataFormat("iso8601");

var txt = fmt.dataToText("2007-01-24T00:00+00:00");

document.write(txt);
Alex (ActiveWidgets)
Thursday, January 24, 2008

This topic is archived.


Back to support forum

Forum search