Closed
Bug 930513
Opened 11 years ago
Closed 8 years ago
Timezone is wrong when retrieved via javascript
Categories
(Core :: JavaScript Engine, defect)
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.
Updated•10 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Comment 1•10 years ago
|
||
> 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•8 years ago
|
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.
Description
•