wwivbbs/wwiv

Birthday date not displayed correctly on newuser account

Closed this issue · 4 comments

In New User Registration, birthday is displayed as "January 01, 1970" if date is earlier than January 1, 1970. Actual birthday date is stored.

Related to #1224.

Screenshot from 2023-01-05 05-40-24

wwiv commented

Not related to that, I think it's because the birthday is bounced through time_t to be displayed.
This line is the problem (which we use to get the nice formatting)

          auto dt = c.user.birthday_dt().to_string("%B %d, %Y");
wwiv commented

Basically anywhere we use User::birthday_dt() we have issues. Fortunately it's only on display.

shouldn't struct tm be used instead of time_t? (not yet looking into the code but jumping to conclusions i'm not even sure about.)

wwiv commented

I've got a fix