Closed Bug 930513 Opened 11 years ago Closed 8 years ago

Timezone is wrong when retrieved via javascript

Categories

(Core :: JavaScript Engine, defect)

24 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 879261

People

(Reporter: vze2k3sa, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release)
Build ID: 20130910160258

Steps to reproduce:

var m_names = new Array("Jan", "Feb", "Mar","Apr", "May", "Jun", "Jul", "Aug", "Sep","Oct", "Nov", "Dec");
		var d_names = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
		var d;
		(function displayLocalMachineTime(){	
			setTimeout(function(){
				d = new Date();
				$( "#localMachineTime" ).html("<h2>Local machine time is: " + d_names[d.getDay()] + " " + m_names[d.getMonth()] + " " +(d.getDate()<10? "0"+d.getDate(): d.getDate()) + " " +(d.getHours()<10? "0"+d.getHours():d.getHours()) + ":" + (d.getMinutes()<10? "0"+d.getMinutes():d.getMinutes()) + ":" + (d.getSeconds()<10? "0" +d.getSeconds(): d.getSeconds())+ " " +d.format("Z")+ " " + d.getFullYear() + "</h2>");
				d=null;
				displayLocalMachineTime();
			}, 1000);
		})();


Actual results:

I get the wrong Timezone (as of today Firefox is EST when it should be EDT)


Expected results:

I should get EDT instead in EST.
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
> d.format("Z")

There is no "format" function on Date objects.  Where exactly are you getting this "format" function and what does it do?
Flags: needinfo?(vze2k3sa)
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.