Method NCrontabViewer.MainForm.Diff does not work with DateTime-Strings of specific locales
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
The current release implementation (version 0.2) of
NCrontabViewer.MainForm.Diff does not work with DateTime-Strings of specific
locales. Example: try to use the application on a computer with German locale.
Reason: the length of the short weekday name is just 2 (not 3).
Possible workaround:
Change line 138 of MainForm.cs to
var timeString = occurance.ToString("ddd dd, MMM yyyy HH:mm",
CultureInfo.InvariantCulture);
http://code.google.com/p/ncrontab/source/browse/tags/0.2/src/NCrontabViewer/Main
Form.cs#138
Original issue reported on code.google.com by niklas.e...@gmail.com
on 26 Jan 2011 at 10:20
- Merged into: #1
Google Code Exporter commented
I tested in a German culture and I get the error shown below. Is this what you
are seeing and mean by it not working in a culture where weekday names are not
3 charaters wide?
System.ArgumentOutOfRangeException: Index was out of range. Must be
non-negative and less than the size of the collection.
Parameter name: startIndex
at System.Text.StringBuilder.Append(String value, Int32 startIndex, Int32 count)
at NCrontabViewer.MainForm.Diff(String oldString, String newString, Int32 index, Int32 length, StringBuilder builder) in c:\ncrontab-0.2\src\NCrontabViewer\MainForm.cs:line 189
at NCrontabViewer.MainForm.DoCrontabbingImpl() in c:\ncrontab-0.2\src\NCrontabViewer\MainForm.cs:line 167
at NCrontabViewer.MainForm.DoCrontabbing() in c:\ncrontab-0.2\src\NCrontabViewer\MainForm.cs:line 78
at NCrontabViewer.MainForm.Timer_Tick(Object sender, EventArgs args) in c:\ncrontab-0.2\src\NCrontabViewer\MainForm.cs:line 68
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Original comment by azizatif
on 26 Jan 2011 at 9:49
Google Code Exporter commented
Exactly!
Original comment by niklas.e...@gmail.com
on 27 Jan 2011 at 8:45
Google Code Exporter commented
Original comment by azizatif
on 28 Jan 2011 at 10:23
- Changed state: Duplicate