Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: IRS demo web cannot simulate future dates as expected #3851

ooharawork opened this Issue Aug 27, 2018 · 2 comments


None yet
2 participants
Copy link

ooharawork commented Aug 27, 2018

IRS demo sample application is supposed to simulate future dates by increasing year/month/day, starting from the current date.
Actually, it shows always the same date January 1, 1901 December 1, 1901 that you cannot move date forward.

Steps To Reproduce

Reproduced on master branch so far but I believe other branches are affected as well.

  1. Click Create Deal
  2. Submit the deal with the default parameters
  3. Click Recent Deals
  4. Look at Run fixings
    • Expected: we should see the current date, e.g. 2018, 8, 27 for year, month and day.
    • Actual: we see 1901, 1, 1 1901, 12, 1.
  5. Click Plus(+) button on on the right of Year
    • Expected: the Year will be increased, e.g. 2018 -> 2019 (or 1901 -> 1902)
    • Actual: the year doesn't change

Error Message

On BankA console, the following error is observed:

Attempt to set demodate to 1902-12-01 but demodate is already 2018-08-27 and can only be updated with a later date {}

Analysis: this 1902 is 1901+1. 12 would be off-by-one issue (handling months in either 1-12 or 0-11)

Update: Correction: January->December


This comment has been minimized.

Copy link

ooharawork commented Aug 27, 2018

Some thoughts:



<span class="ui basic label">{{date.year}}</span>

backed up by Controller:

nodeService.getDate().then(function (date) {
return $ = date;

which calls Frontend Service:

this.getDate = function () {
return load('date', $http.get(endpoint('/api/irs/demodate'))).then(function (resp) {
var dateParts =;
date = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]); // JS uses 0 based months

The above service calls the REST API on backend and expects that its response would return an array, e.g. [2018,8,27],
while, the actual Backend REST API:

fun fetchDemoDate(): LocalDate {
return LocalDateTime.ofInstant(rpc.currentNodeTime(), ZoneId.systemDefault()).toLocalDate()

returns ISO-8601 format "2018-08-27", which has discrepancy against the frontend service.

@joeldudleyr3 joeldudleyr3 added the bug label Oct 1, 2018

@joeldudleyr3 joeldudleyr3 removed their assignment Nov 13, 2018


This comment has been minimized.

Copy link

joeldudleyr3 commented Nov 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.