2

I'm using Mono on the Raspberry Pi (running Raspbmc). Most things (amazingly!) simply work, however there's one piece of code that is acting weird.

Using the csharp C# "shell", I get this (same results for the compiled counterpart):

csharp> DateTime.Now.ToString();
"00/735023/0001 23:05:56"

csharp> DateTime.Now.ToString("dd"); //get day numeral
"735023"

csharp> DateTime.Now.ToString("MMMM"); //get month name
System.ArgumentOutOfRangeException: Argument is out of range.
  at System.Globalization.DateTimeFormatInfo.GetMonthName (Int32 month) 
  [...]

...However, accessing the separate properties works:

csharp> DateTime.Now.Day.ToString();
"4"

csharp> DateTime.Now.Month.ToString();
"6"

csharp> DateTime.Now.Year.ToString();
"2013"

Any idea what's going on, or at least where I should submit a bug?

FWIW: This is what I'm running

pi@raspbmc:~$ mono -V
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-5)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       normal
        Notifications: epoll
        Architecture:  armel,vfp
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            Included Boehm (with typed GC and Parallel Mark)
Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233

1 Answers1

2

There's relevant bug reported: https://bugzilla.xamarin.com/show_bug.cgi?id=7938. Reason: using hardfp instead of softfp floating point ABI which is incompatible with Mono 2.10. There are some patches coming to support the hardfp in Mono, but nothing yet mainline.

mrówa
  • 5,671
  • 3
  • 27
  • 39
  • Thanks for the link to the bug! It's exactly what I've been experiencing. Unfortunately, the bug was opened 9 months ago (at the time of writing) and the comments are not encouraging: "*the patch is linked in comment#3. AFAIK it's not going to be included upstream because of licensing conflicts.*" – Cristian Diaconescu Jun 05 '13 at 10:17