When I start tracking time for a task when the language is set to English. then go to edit the time spent on that task from additional info.
A list of the days that I worked in shows except for the date of the day we are in. (That's the right behavior)
That should happen even if I change the language to Arabic.
and vice versa.
The list of days shows the date of the day we are in.
That happens when The language selected is Arabic and the time tracing started while the language is English and vice versa.
There is no output
These are some screens showing what happens.



This is not the only problem that happens regarding dates related functionality.
But it is the easiest one to reproduce.
Good catch! Thank you very much! I am working on a patch.
Ugly issue... I naively assumed that
moment(date).format('YYYY-MM-DD');
Would return the same on every system. Of course it doesn't....
I published a patch and also some automated migration scripts for the data. Hope this works smoothly. Could you check this for me with your data (don't forget to make a backup first)?
Unfortunately, a critical error occurred in the migration.

I played around with moment and it seems like it can't parse Hindu-Arabic numerals.
So I tried a quick fix to that is converting the Hindu-Arabic numerals to Western-Arabic numerals before parsing them with moment like this.
const numberMap = {
'Ù¡': '1',
'Ù¢': '2',
'Ù£': '3',
'Ù¤': '4',
'Ù¥': '5',
'Ù¦': '6',
'Ù§': '7',
'Ù¨': '8',
'Ù©': '9',
'Ù ': '0'
};
function replace(date : string): string {
let newDate : string = date;
return newDate.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
return numberMap[match];
});
}
But there are 2 problems I can spot.
The project state migration doesn't run when importing a project from a file so imported data doesn't get updated.
The second one is a bit tricky. If a date exists twice one of them will be overwritten like this example.
"timeSpentOnDay": {
"٢٠١٩-١٢-٢٧": 1001,
"2020-01-02": 7010,
"2020-01-03": 4003,
"2020-01-09": 25000,
"Ù¢Ù Ù¢Ù -Ù Ù¡-Ù Ù©": 5001
},
"timeSpent": 42015,
the last 2 dates are the same day but when the migration runs it results in this
"timeSpentOnDay": {
"2019-12-27": 1001,
"2020-01-02": 7010,
"2020-01-03": 4003,
"2020-01-09": 5001
},
"timeSpent": 42015,
So it would be better if they add up instead of getting overwritten.
That's great work thank you! Would you maybe be willing to provide a PR for these adjustments for the migrate scripts for tasks and projects?
Sure, I will.
Thank you very much! I'll try to add a similar thing for japenese, korean and chinese next week. We probably need it.
Hopefully this is fixed with one of the newer releases. Please let me know if you encounter any further issues with this.