locked
Program puzzle RRS feed

  • Question

  • I've just publish a program on the small basic site (reference JPW517) and I find a bit of a puzzle. The program finds the start and end dates of British Summer Time (daylight saving time). The program gives the correct dates when I run it on my computer but gives dates that are a day early when I run it on the small basic site. Can anyone explain that?
    Thursday, October 13, 2011 8:20 PM

Answers

  • Hi, can you give an example year and the dates returned in error - for me your code run locally and using http://smallbasic.com/smallbasic.com/program/?JPW517 give the same results for the years I tried.  Can't see anything in the code (e.g. Clock method) that may be dependent on location or locale.  I guess it is possible Silverlight (web) could do different things with integer/float arithmetic and rounding, but I don't see it in the cases I tried.
    Thursday, October 13, 2011 9:13 PM

All replies

  • Hi, can you give an example year and the dates returned in error - for me your code run locally and using http://smallbasic.com/smallbasic.com/program/?JPW517 give the same results for the years I tried.  Can't see anything in the code (e.g. Clock method) that may be dependent on location or locale.  I guess it is possible Silverlight (web) could do different things with integer/float arithmetic and rounding, but I don't see it in the cases I tried.
    Thursday, October 13, 2011 9:13 PM
  • Thanks for your interest in the problem. I tried the dates for 2011. The program returned start date 26 March and end date 29 October. They should be 27 March and 30 October respectively, as the program says when I run it on my computer.
    Thursday, October 13, 2011 9:26 PM
  • Those are the dates that I get from the web site:

    Thursday, October 13, 2011 10:12 PM
  • OK. So I must be doing something wrong in running the program, then. How exactly do you run a program on the web? I typed the date into the little black area above the program listing and pressed enter. It might be worth mentioning that when I typed in the number it didn't show up on the screen; it didn't echo the input, if you like.
    Thursday, October 13, 2011 10:41 PM
  • when I open http://smallbasic.com/smallbasic.com/program/?JPW517  this is what I get:

     

    Then I entered 2011 at the end of the text, and press enter.

    Maybe you have a problem with Silverlight or browser?

    Thursday, October 13, 2011 11:31 PM
  • I've been using Google Chrome as my browser. I tried using IE with the latest version of Silverlight, but that didn't improve matters. I'm running the 64-bit version of Windows 7. Would that create any problems?
    Friday, October 14, 2011 1:04 AM