Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15201] iOS: Same variable display different values

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.3
Fix Version/sn/a
ComponentsiOS
Labelsdate, reprod
ReporterMostafizur Rahman
AssigneeUnknown
Created2013-09-13T03:30:15.000+0000
Updated2018-02-28T20:03:40.000+0000

Description

var win = Ti.UI.createWindow(),
	date = new Date(),
	today = new Date(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours() + 1, 0, 0, 0),
	someDate = new Date(1876, 1, 1, 11, 46, 0, 0);
	
console.log("TODAY: "+today);
console.log("SOME DATE: "+someDate);

function checkDate(e)
{
	console.log("> TODAY: "+e.today);
	console.log("> SOME DATE: "+e.someDate);
}


Ti.App.addEventListener("forExample", checkDate);
Ti.App.fireEvent("forExample", {today: today, someDate: someDate});

win.open();
*OUT PUT* [INFO] : TODAY: Fri Sep 13 2013 06:00:00 GMT+0200 (CEST) // RIGHT [INFO] : SOME DATE: Tue Feb 01 1876 11:46:00 GMT+0100 (CET) // RIGHT [INFO] : > TODAY: Fri Sep 13 2013 06:00:18 GMT+0200 (CEST) // WRONG [INFO] : > SOME DATE: Tue Feb 01 1876 11:45:50 GMT+0100 (CET) // WRONG

Comments

  1. Matej 2013-09-16

    Why has been changed my (Reporter) name? + Components: iOS *IT IS NOT ONLY ANDROID!*
  2. Shameer Jan 2014-08-13

    Issue reproduces Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.3.0.GA iOS SDK: 7.1 iOS iPhone Simulator: 7.1
  3. Lee Morris 2017-06-20

    I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170620103414 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source