I was working on our Intranet people list, trying to put in the official birthdays of people (as opposed to their real birthdays — which is a topic in itself.)
I was a bit shocked to see my birthday as 22 Nov. (It’s 23 Nov).
It was definitely entered correctly on the HRMS.
After a bit of digging around, I realized the problem. I’m in New Jersey. And the the code I was using to detect was moment(date)— which takes a timestamp and converts it to the date in the current time zone. At the time I was born, it was 22 Nov in New Jersey, but 23 Nov in India.
The correct thing to do is to use moment.utc(date) to parse the date. That’ll convert it to the time in GMT, which is how timestamps are supposed to be used.
But I’d never have spotted it if I wasn’t in the US.
That leads me to think… How much more stuff could we learn — if only someone different from us were looking at our work? For example:
- People whose native script is not English (Arabic, Chinese)
- Americans (who read dates as MM/DD instead of DD/MM)
- Sensitive people (who feel bad about dashboards ordering them about)
- Impatient people (who won’t read the manual or explanations)
- Old people (who can’t read small font sizes)
- Poor people (who can’t afford smartphones and use WAP or AMP)
Unless we put ourselves in others’ shoes, we can’t really see the flaws in ourselves or our work.