[AC-2899] Android: date_instance.UTC() is not a method
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-12-30T12:36:19.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Keith Gable |
Assignee | Paul Dowsett |
Created | 2011-12-30T09:37:33.000+0000 |
Updated | 2016-03-08T07:47:52.000+0000 |
Description
Problem
An instance of Date does not have a UTC() method. On iOS and in Normal JavaScript(TM), UTC() exists and returns the correct value.Test case
var thisDate=Date.UTC(2005,7,8);
Ti.API.info("Number of milliseconds from January 1, 1970 to August 8, 2005, according to universal time " + thisDate);
Output / Logs
1064 TiAPI I Number of milliseconds from January 1, 1970 to August 8, 2005, according to universal time 1123459200000
Keith I am unable to reproduce this issue. In order for me to accept any further tickets from you, all the fields must be complete and the body must include all the information detailed in the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist). I have reformatted this ticket to give you a guide for future reports. If your future tickets are well-formed, then I can get them escalated without any delays. Thank you for your cooperation and understanding about why this is necessary. Cheers
Actually, upon testing this again, I can't get it to reproduce either. Go ahead and close this invalid :)
The error was probably caused by
.UTC()
being called on a date object instance, whereas it is actually a method of the [Date](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date) constructor. I hope you can appreciate the time it can take us to reproduce issues that are any more complex than this, and thus why a test case is always required. Please refer to [Creating a Test Case](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-CreatingaTestCase) for guidance. Thanks