|
From: Jamie D. <jam...@gm...> - 2016-07-27 23:49:53
|
FWIW, before asking here I did try and search through the mailing list, and this post from 2006 kept cropping up: https://sourceforge.net/p/icu/mailman/message/12529106/ This is strikingly similar to what I'm seeing (1st Jan 0001 is 2 days off - I get 3rd Jan 0001), but given this is from 2006, surely it's been fixed by now? -Jamie. On 27 July 2016 at 23:40, Jamie Dale <jam...@gm...> wrote: > Hey all, > > I'm investigating an issue where pre-Gregorian dates are failing to format > correctly with icu::DateFormat. > > We're using ICU 53, and our internal concept of time is ticks of 0.1 > microseconds since 1st January 0001 - we convert this to a UNIX timestamp > and multiply by U_MILLIS_PER_SECOND before passing it to ICU as a UDate. > > At first I thought this might be due to the Gregorian switch-over, so I > tried constructing my own icu::GregorianCalendar, setting the Gregorian > change date to 1st January 0001, and then letting the icu::DateFormat adopt > that as its calendar, however it didn't seem to make any difference (my > calendar reports U_USING_FALLBACK_WARNING when being constructed... I'm not > sure why). > > I'm wondering if anyone else has seen this issue, or whether anyone has > any advice? > > Thanks, > Jamie. > |