Timezone is wrong when retrieved via javascript

RESOLVED DUPLICATE of bug 879261

Status

()

RESOLVED DUPLICATE of bug 879261
5 years ago
2 years ago

People

(Reporter: vze2k3sa, Unassigned, NeedInfo)

Tracking

24 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
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)

Updated

2 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 879261
You need to log in before you can comment on or make changes to this bug.