{ "id": "118756", "key": "ALOY-797", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "15887", "description": "2014 Sprint 03", "name": "2014 Sprint 03", "archived": true, "released": true, "releaseDate": "2014-02-14" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-02-10T16:45:31.000+0000", "created": "2013-08-19T17:27:53.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "15402", "description": "Alloy 1.2.0, concurrent with SDK 3.1.0", "name": "Alloy 1.2.0", "archived": false, "released": true, "releaseDate": "2013-08-15" } ], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-02-13T21:35:01.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13610", "name": "Builtins", "description": "Builtin Javascript libraries" } ], "description": "h3. Description\r\nThe latest momentjs library has changed the timezone offset functionality breaking the previous implementation. I believe this is due to the release of the new momentjs timezone library which we may want to start including as well. \r\n\r\nh3. Test Case\r\nI have attached a simple test case which includes the momentjs 2.0 library to demonstrate the difference in behavior.\r\n\r\nh3. Resources\r\nNew timezone library: http://momentjs.com/timezone/", "attachment": [ { "id": "41717", "filename": "app.zip", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-19T17:27:53.000+0000", "size": 4987698, "mimeType": "application/zip" } ], "flagged": false, "summary": "momentjs 2.1 zone() behavior has changed with moment-timezone release", "creator": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Alloy 1.2", "closedSprints": [ { "id": 29, "state": "closed", "name": "2014 Sprint 03", "startDate": "2014-02-03T23:29:45.999Z", "endDate": "2014-02-16T23:29:45.999Z", "completeDate": "2014-02-27T21:07:49.134Z" } ], "comment": { "comments": [ { "id": "292147", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "To use the new timezone library, you also need to generate and include timezone-data for the timezones you plan to support (http://momentjs.com/timezone/data/) We'd have to include every timezone to create a universal solution. This seems better done by the individual developers so that they can tailor the code to the timezones they want to support.\r\n\r\nUpdating the app.zip you attached, I'd have to do something like this (the tz-data could be in a separate file of course)\r\n\r\n{code}\r\nvar momentTZ = require('moment-timezone');\r\nmomentTZ.tz.add({\r\n \"zones\": {\r\n \"America/Los_Angeles\": [\r\n \"-7:52:58 - LMT 1883_10_18_12_7_2 -7:52:58\",\r\n \"-8 US P%sT 1946 -8\",\r\n \"-8 CA P%sT 1967 -8\",\r\n \"-8 US P%sT\"\r\n ]\r\n },\r\n \"rules\": {\r\n \"US\": [\r\n \"1918 1919 2 0 8 2 0 1 D\",\r\n \"1918 1919 9 0 8 2 0 0 S\",\r\n \"1942 1942 1 9 7 2 0 1 W\",\r\n \"1945 1945 7 14 7 23 1 1 P\",\r\n \"1945 1945 8 30 7 2 0 0 S\",\r\n \"1967 2006 9 0 8 2 0 0 S\",\r\n \"1967 1973 3 0 8 2 0 1 D\",\r\n \"1974 1974 0 6 7 2 0 1 D\",\r\n \"1975 1975 1 23 7 2 0 1 D\",\r\n \"1976 1986 3 0 8 2 0 1 D\",\r\n \"1987 2006 3 1 0 2 0 1 D\",\r\n \"2007 9999 2 8 0 2 0 1 D\",\r\n \"2007 9999 10 1 0 2 0 0 S\"\r\n ],\r\n \"CA\": [\r\n \"1948 1948 2 14 7 2 0 1 D\",\r\n \"1949 1949 0 1 7 2 0 0 S\",\r\n \"1950 1966 3 0 8 2 0 1 D\",\r\n \"1950 1961 8 0 8 2 0 0 S\",\r\n \"1962 1966 9 0 8 2 0 0 S\"\r\n ]\r\n },\r\n \"links\": {}\r\n});\r\nalert(\"moment-timezone response:\" + momentTZ().tz(\"America/Los_Angeles\").format());\r\n{code}", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-02-10T16:45:31.000+0000", "updated": "2014-02-10T16:45:31.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }