NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Other Clients Old Stuff (legacy) NextPVR Enhanced Web Admin (NEWA) v
« Previous 1 … 30 31 32 33 34 … 47 Next »
[Bug] Manual Recordings

 
  • 0 Vote(s) - 0 Average
[Bug] Manual Recordings
MediaDept
Offline

Junior Member

Posts: 22
Threads: 4
Joined: Sep 2007
#1
2007-12-14, 09:25 AM
Hi,

I think I found a (localisation) bug in ManualRecord.aspx.cs. My system is located in Germany thus the DateTime format differs from the English/American one. Setting up a manual recording fails with an error message (the error message is taken from ManualRecord2.aspx.cs, because I already implemented a workaround in ManualRecord.aspx.cs):

Code:
Server Error in '/gbpvr' Application.
String was not recognized as a valid DateTime.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: String was not recognized as a valid DateTime.

Source Error:

Line 55:
Line 56:             //Set the start time for for programme to record
Line 57:             DateTime fullStartDate = System.Convert.ToDateTime(startDate.SelectedDate.ToString("MM/dd/yyyy") + " " + startTime.SelectedTime.ToString("hh:mm tt"));
Line 58:             dummyPgm.setStartTime(fullStartDate);
Line 59:


Source File: c:\Program Files\devnz\gbpvr\web\ManualRecord2.aspx.cs    Line: 57

Stack Trace:

[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +2228162
   System.DateTime.Parse(String s, IFormatProvider provider) +26
   System.Convert.ToDateTime(String value) +86
   gbweb.ManualRecord2.LinkButton1_Click(Object sender, EventArgs e) in c:\Program Files\devnz\gbpvr\web\ManualRecord2.aspx.cs:57
   System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +75
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +97
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +172
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4885


Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

The German DateTime formats are dd.MM.yyyy and HH.mm respectively. Therefore I changed the lines 66 and 70 in ManualRecord.aspx.cs from

Code:
[66] DateTime fullStartDate = System.Convert.ToDateTime(startDate.SelectedDate.ToString("MM/dd/yyyy") + " " + startTime.SelectedTime.ToString("hh:mm tt"));
[...]
[70] DateTime fullEndDate = Convert.ToDateTime(startDate.SelectedDate.ToString("MM/dd/yyyy") + " " + endTime.SelectedTime.ToString("hh:mm tt"));

to

Code:
[66] DateTime fullStartDate = System.Convert.ToDateTime(startDate.SelectedDate.ToString("dd.MM.yyyy") + " " + startTime.SelectedTime.ToString("HH:mm"));
[...]
[70] DateTime fullEndDate = Convert.ToDateTime(startDate.SelectedDate.ToString("dd.MM.yyyy") + " " + endTime.SelectedTime.ToString("HH:mm"));

This works for me until the next update, but I hope C# provides a method to get the local defaults (as in the date picker for example) and so a more generic way to solve the problem.

Greetings
MediaDept
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#2
2007-12-15, 03:47 AM (This post was last modified: 2007-12-15, 04:40 PM by UncleJohnsBand.)
MediaDept Wrote:Hi,

I think I found a (localisation) bug in ManualRecord.aspx.cs. My system is located in Germany thus the DateTime format differs from the English/American one. Setting up a manual recording fails with an error message (the error message is taken from ManualRecord2.aspx.cs, because I already implemented a workaround in ManualRecord.aspx.cs):

Code:
Server Error in '/gbpvr' Application.
String was not recognized as a valid DateTime.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: String was not recognized as a valid DateTime.

Source Error:

Line 55:
Line 56:             //Set the start time for for programme to record
Line 57:             DateTime fullStartDate = System.Convert.ToDateTime(startDate.SelectedDate.ToString("MM/dd/yyyy") + " " + startTime.SelectedTime.ToString("hh:mm tt"));
Line 58:             dummyPgm.setStartTime(fullStartDate);
Line 59:


Source File: c:\Program Files\devnz\gbpvr\web\ManualRecord2.aspx.cs    Line: 57

Stack Trace:

[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +2228162
   System.DateTime.Parse(String s, IFormatProvider provider) +26
   System.Convert.ToDateTime(String value) +86
   gbweb.ManualRecord2.LinkButton1_Click(Object sender, EventArgs e) in c:\Program Files\devnz\gbpvr\web\ManualRecord2.aspx.cs:57
   System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +75
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +97
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +172
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4885


Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
The German DateTime formats are dd.MM.yyyy and HH.mm respectively. Therefore I changed the lines 66 and 70 in ManualRecord.aspx.cs from

Code:
[66] DateTime fullStartDate = System.Convert.ToDateTime(startDate.SelectedDate.ToString("MM/dd/yyyy") + " " + startTime.SelectedTime.ToString("hh:mm tt"));
[...]
[70] DateTime fullEndDate = Convert.ToDateTime(startDate.SelectedDate.ToString("MM/dd/yyyy") + " " + endTime.SelectedTime.ToString("hh:mm tt"));
to

Code:
[66] DateTime fullStartDate = System.Convert.ToDateTime(startDate.SelectedDate.ToString("dd.MM.yyyy") + " " + startTime.SelectedTime.ToString("HH:mm"));
[...]
[70] DateTime fullEndDate = Convert.ToDateTime(startDate.SelectedDate.ToString("dd.MM.yyyy") + " " + endTime.SelectedTime.ToString("HH:mm"));
This works for me until the next update, but I hope C# provides a method to get the local defaults (as in the date picker for example) and so a more generic way to solve the problem.

Greetings
MediaDept

Thanks...give the attached beta a try and let me know how it works out. I added parameters to every page to auto detect the localization settings and corrected the date error you reported above.

I tested by setting my region to German/Germany and seemed to work fine.

Use the beta found here to test it out. Follow instructions on wiki for upgrading.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't stream existing recordings Bobins 44 15,386 2018-07-18, 08:19 PM
Last Post: sub
  Difference between NPVR and NEWA recordings lists Bobins 4 5,080 2017-09-27, 10:16 PM
Last Post: Bobins
  Server Error when settign a manual recording in NEWA martinu 2 2,333 2017-01-23, 01:30 AM
Last Post: UncleJohnsBand
  Can't stream recordings to desktop browser but Live TV works. Bobins 8 4,464 2016-12-15, 07:40 PM
Last Post: Bobins
  Can't schedule recordings remotely enforcersu 5 2,852 2016-11-17, 06:00 PM
Last Post: mvallevand
  Manual recrord icon broke snagglewest 0 2,211 2016-08-21, 05:18 PM
Last Post: snagglewest
  Extra Delete Button for manual recordings? jksmurf 0 2,287 2016-04-09, 01:09 AM
Last Post: jksmurf
  Web Access for Manage Recordings takes 5 minutes to load. stevepro 3 2,271 2015-09-05, 12:33 AM
Last Post: UncleJohnsBand
  Bug causing all recordings to be deleted chuck_2330 13 5,927 2015-09-02, 10:43 AM
Last Post: UncleJohnsBand
  Trouble with manual recording - DateTime fullStartDate = DateTime.Parse(StartDateBox. milanwb 8 4,458 2015-09-01, 12:26 AM
Last Post: UncleJohnsBand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode