{ "id": "62717", "key": "TIMOB-2085", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:58:02.000+0000", "created": "2011-04-15T03:09:59.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "createtimestamp", "defect", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:58:03.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
spun off of #1642
\n1.run the script below on an an iOS device running 3.2.2 or\nolder.
\nvar filename = 'iphone_coming_soon.png'; var timeStampOfFile =\n''; var file =\nTitanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename);\nif ( file.exists() ) { Ti.API.info('IF IS TRUE'); timeStampOfFile =\nfile.createTimestamp(); }
\nTi.API.info('The value of timeStampOfFile is: ' +\ntimeStampOfFile);
\nresults: [INFO] newfile.txt created: Wed Dec 31 1969\n16:00:00 GMT-0800 (PST)
\nexpected: return actual date,
\nnotes: Setting to medium
Could be an Apple bug. Looking into it.
This is indeed an Apple bug. There is a workaround but it WILL\nreturn different file creation dates on 3.x and 4.x (we spoof the\ncreation date with the modification date on 3.x - they're similar,\nbut may differ by a few seconds).
\nWill patch the fix into 1_4_X when approved.
(from [9977c7719107da0d1281fd50b487667c73d194c9])\n[#2085] Added test in KS 'Filesystems'. \nhttp://github.com/appcelerator/titanium_mobile/commit/9977c7719107d...
(from [c6164c4d92c302ff3582ceb3bb76727cf7aa57e0])\n[#2085 state:fixed-in-qa] Spoof file modification\ndate as creation date when creation date is not available (3.x\nApple bug for initially installed files) \nhttp://github.com/appcelerator/titanium_mobile/commit/c6164c4d92c30...
This also appears to be an issue with\nfile.modificationTimestamp() ... I assume you noticed, but it\nwasn't listed.
\nTim
\nSee below for example output.
\nTi.API.debug('Images.getImageUrl image details Create:Modify = ' +\nString(new Date(imageFile.createTimestamp())) +':'+String(new\nDate(imageFile.modificationTimestamp())));
Renders
\n[DEBUG] Images.getImageUrl image details\nCreate:Modify = Wed Dec 31 1969 19:00:00 GMT-0500 (EST):Wed Dec 31\n1969 19:00:00 GMT-0500 (EST)
This does not occur under 3.1.x.
\n\n[INFO] created = Sun Oct 17 2010 22:58:21 GMT-0700 (PDT)\n[INFO] modified = Sun Oct 17 2010 22:58:21 GMT-0700 (PDT)
\n
\nThom, can you confirm whether or not the modification bug\nappears in 3.2 ONLY?
I am unable to repro the incorrect behavior on a 3.2.2 device -\nusing 1.5.0.62c1cae the test works as expected.