Possible birthdate bug

Something I’ve noticed while setting up NPCs and editing characters after approval is that the birthdate field on the web portal appears to behave differently between ‘setting it in chargen’ vs ‘setting it in the char page edit screen after chargen.’

Steps to reproduce:

  1. I chargen a character on the portal and set their birthdate to 02/01/1917, following the prompt to use mm/dd/yyyy format.
  2. The character is subsequently approved. I decide I changed my mind and wanted to pick a different birthday for the char.
  3. I go to the character’s page and try to update their birthdate via the edit screen.
  4. If I put in 03/10/1917, what comes out the other end is 1917-10-03.
  5. If I put in 03/15/1917, I get an invalid date error (presumably because there is no 15th month).

It seems that after approval, if I want to change the character’s birthdate, I now have to use yyyy/mm/dd format instead of mm/dd/yyyy.

Here’s the error as seen in the logs:

2020-06-30 12:58:28 ERROR - Error in Web Request: client= error=invalid date backtrace=["/home/ares/aresmush/engine/aresmush/models/ohm_data_types.rb:11:in parse'", "/home/ares/aresmush/engine/aresmush/models/ohm_data_types.rb:11:in block in module:DataType’", “/home/ares/.rvm/gems/ruby-2.6.3/gems/ohm-3.1.1/lib/ohm.rb:1038:in block in attribute'", "/home/ares/.rvm/gems/ruby-2.6.3/gems/ohm-3.1.1/lib/ohm.rb:1507:in block in _sanitized_attributes’”, “/home/ares/.rvm/gems/ruby-2.6.3/gems/ohm-3.1.1/lib/ohm.rb:1506:in each'", "/home/ares/.rvm/gems/ruby-2.6.3/gems/ohm-3.1.1/lib/ohm.rb:1506:in _sanitized_attributes’”, “/home/ares/.rvm/gems/ruby-2.6.3/gems/ohm-3.1.1/lib/ohm.rb:1357:in save'", "/home/ares/aresmush/engine/aresmush/models/ohm_callbacks.rb:38:in save’”, “/home/ares/.rvm/gems/ruby-2.6.3/gems/ohm-3.1.1/lib/ohm.rb:1437:in update'", "/home/ares/aresmush/plugins/demographics/public/demo_char.rb:26:in update_demographic’”]

1 Like