我在Raspberry Pi上使用Mono (运行Raspbmc)。大多数事情(令人惊讶!)简单地工作,但是有一段代码表现得很奇怪。
使用csharp外壳“C#”,我得到了如下结果(对于编译后的副本,结果是相同的):
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,访问单独的属性是有效的:
csharp> DateTime.Now.Day.ToString();
"4"
csharp> DateTime.Now.Month.ToString();
"6"
csharp> DateTime.Now.Year.ToString();
"2013"你知道发生了什么吗,或者至少我应该在哪里提交一个bug?
FWIW:这就是我正在运行的
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)发布于 2013-06-05 04:29:08
有相关的bug报告:https://bugzilla.xamarin.com/show_bug.cgi?id=7938。原因:使用hardfp而不是softfp浮点ABI,这与Mono 2.10不兼容。Mono中有一些补丁来支持hardfp,但还没有主流的补丁。
https://stackoverflow.com/questions/16926634
复制相似问题