We're updating the issue view to help you get more done. 

setTimeInMillis called twice

Description

in the course of constructing a calendar (in the course of constructing a dateformat) c->setTimeInMillis(getNow(),status) .. is called twice. once in the constructor, and once by the calling code.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 icu_4_1::GregorianCalendar::GregorianCalendar (this=0x600880, aLocale=@0x7000, status=@0xbffff4ac) at gregocal.cpp:191 191 setTimeInMillis(getNow(), status); (gdb) print status $21 = (UErrorCode &) @0xbffff4ac: U_USING_FALLBACK_WARNING (gdb) n 192 } (gdb) print status $22 = (UErrorCode &) @0xbffff4ac: U_USING_FALLBACK_WARNING (gdb) n createStandardCalendar (calType=<value temporarily unavailable, due to optimizations>, loc=@0x600378, status=@0xbffff4ac) at calendar.cpp:329 329 } (gdb) n icu_4_1::Calendar::createInstance (zone=0x6005c0, aLocale=@0x600378, success=@0xbffff4ac) at calendar.cpp:800 800 if(U_FAILURE(success) || !u) { (gdb) print success $23 = (UErrorCode &) @0xbffff4ac: U_USING_FALLBACK_WARNING (gdb) n 809 if(u->getDynamicClassID() == UnicodeString::getStaticClassID()) { (gdb) 869 c = (Calendar*)u; (gdb) 809 if(u->getDynamicClassID() == UnicodeString::getStaticClassID()) { (gdb) 873 c->adoptTimeZone(zone); // Set the correct time zone (gdb) 874 c->setTimeInMillis(getNow(), success); // let the new calendar have the current time. (gdb) 876 return c;

Environment

Status

Assignee

Steven R. Loomis

Reporter

Steven R. Loomis

Time Needed

Hours

tracCreated

Apr 09, 2009, 4:54 PM

tracOwner

srl

tracProject

all

tracReporter

srl

tracStatus

accepted

tracWeeks

0.1

Components

Priority

assess